Jump to content
Developer Wiki and Function Reference Links ×

Getting Dimensions of Object in Meters instead of Document Units?


Recommended Posts

Hi Everyone,

I've been working on a marionette object that basically replicates the base functionality of the Vectorworks video screen tool but with my symbol library. In simple terms, the user inputs tile type, width, and height, and the marionette reads the tile dimensions and builds the surface accordingly. It also writes some parameters to the video wall record - Screen resolution, screen dimensions, tile type, and then tile resolution and dimensions, which are then put onto the sheet layer in a datatag. 

 

This works great in Feet/Inches, since I just convert to meters for the relevant data. However, since the script relies on the 'Get 3D Info' node, it becomes problematic if we decide to draw in metric (such as for a show overseas), since that node reads dims in document units.

 

Is there a node type or some type of workaround that allows me to read 3D data in a consistent unit type (meters preferably) instead of the document units? I have a few other workarounds in mind but that would be the cleanest.

 

image.thumb.png.5c8e74aa645b668bae22df4b0e378e00.png

 

 

Link to comment

Hello @ATalbot,

   There is not a way to script your request using stock Marionette nodes, so I created a custom node, Meters, using a short one line script I use often in the "easier" scripting environments – VectorScript and Python. Easier for me, that is. See attached file.

 

   I do not know how to add this node to a custom library, so if anyone wants to improve on the implementation, please do.

 

   Using the same approach, one could also modify the Get 3D Info node and convert each output to Meters, which I originally set out to do, but I feel this simpler node is more flexible for general use.

 

HTH,

Raymond

 

Marionette Meters Node.vwx

           Saved as v2018

 

  • Like 1
Link to comment
  • 2 weeks later...
  • Marionette Maven

I'll make a note to create a conversion node that will use document units for conversion.

 

I'm aware of and looking into this on a larger scale because some functions require specific units under-the-hood which has gotten in the way previously when document units differ (for example, some functions ALWAYS expect/output metric).

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...