AlHanson Posted February 24, 2020 Share Posted February 24, 2020 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? Quote Link to comment
Recommended Posts
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.