Jump to content
AlHanson

Accessing Secondary Units within Marionette

Recommended Posts

Is there any way to directly access the secondary units that are configured within a document via Marionette? For example, I'm playing with a script to basically recreate the existing Scale Bar tool, but using dual dimensions (feet on top, meters on the bottom). It's easy enough to build this using basic math conversion for a set secondary unit or manually typing the secondary unit in to convert the dim value, but it would be great to directly tie this to the defined secondary units for flexibility and to see those units displayed properly in the OIP. Digging through the DIM node's code it appears that this could be a simple matter of changing the value in the line "units = vs.GetPrefReal(150)" to "units = vs.GetPrefReal(200)" per the VS:Function Appendix (http://developer.vectorworks.net/index.php/VS:Function_Reference_Appendix_F#Secondary_Units_Selectors) but that doesn't seem to work for me, so I guess it's actually tied to the current OIP Marionette.WidgetType.RealCoord implementation?

Share this post


Link to post

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.


 

7150 Riverwood Drive, Columbia, Maryland 21046, USA   |   Contact Us:   410-290-5114

 

© 2018 Vectorworks, Inc. All Rights Reserved. Vectorworks, Inc. is part of the Nemetschek Group.

×
×
  • Create New...