Jump to content
Developer Wiki and Function Reference Links ×

Spotlight - script move of legend points?


SamIWas

Recommended Posts

I assume that the Control Points for label legends are buried inside the Lighting Device or some other record somewhere, and thus able to be manipulated.  I have found 8 control points which I am able to pull into a worksheet and view, but they don't appear to have anything to do with label legend field locations.  Does anyone know if there's a syntax which would allow a script to move a certain label point for a range of selected fixtures?

Link to comment
1 hour ago, C. Andrew Dunning said:

You might want to check out AutoPlot Tools For Spotlight.  Included is a "Copy Altered Label Legends" script that allows you to copy an altered layout from one Lighting Device to other selected fixtures.  Pretty spiffy script...

 

Thanks!  I've seen that one.  Had a little different idea in mind.  I've figured out where the label positions are stored, but they're in a long text string and not separate fields, so now I need to look at how I can manipulate that text string effectively.

Link to comment

Indeed you do need to update the control points.

I'm curious though.  I don't understand what you wish to achieve.  What is the exact workflow?  I ask because "a syntax which would allow a script to move a certain label point for a range of selected fixtures?" sounds like exactly like what "Copy Altered Label Legends" does.  Perhaps you have an exact placement in fixture relative coordinates you want to assign to fixture labels in a new, old, or someone else's drawing.  You are going to find this a tricky script to pull off.  Remember legend fields are measured differently depending on where they are placed relative to the bounding box.  If you want to achieve something different, however slightly, describe the workflow.  From the my understanding that I just described, using your own imported Label Legend and assigning it to the fixtures or using Copy Altered Label Legends seems like the way to go.

On the other hand, maybe you just want to have some fun trying to script it.

Link to comment
On 3/26/2019 at 5:27 PM, Sam Jones said:

Indeed you do need to update the control points.

I'm curious though.  I don't understand what you wish to achieve.   Perhaps you have an exact placement in fixture relative coordinates you want to assign to fixture labels in a new, old, or someone else's drawing.

 

My idea was to be able to move them up or down by a certain distance.  

 

Quote

You are going to find this a tricky script to pull off.  

 

Indeed...I decided it wasn't worth the time since it involved parsing a multi-line text string.

 

Quote

From the my understanding that I just described, using your own imported Label Legend and assigning it to the fixtures or using Copy Altered Label Legends seems like the way to go.

 

I did start using "copy altered label legends" for now.  My only issue is that it doesn't appear to work on 3D legends.  I have not yet looked through the code needed to work on those. 

I do like how yours is able to select the source fixture after running the script.  That's a thing I need to learn how to do.

 

Quote

On the other hand, maybe you just want to have some fun trying to script it.

 

Guilty!

Link to comment
  • 3 years later...
On 3/26/2019 at 12:57 PM, SamIWas said:

Thanks!  I've seen that one.  Had a little different idea in mind.  I've figured out where the label positions are stored, but they're in a long text string and not separate fields, so now I need to look at how I can manipulate that text string effectively.

Hi,

 

I am trying to figure out those strings, would you guide me what is the best way to find those legend points? 

 

Thank you

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...