Jump to content
Developer Wiki and Function Reference Links ×

Convert Dimensions to Real Numbers


EmilyArch

Recommended Posts

I'm trying to compare Dimensions using Less Than in a Marionette script, and I've found that I have to put Real Numbers into the Less Than Node in order to get the Boolean result I need. I've been trying to convert my Dimensions to Real Numbers, and I'm hitting a road block in doing so. I've tried Float, Div by 1", and Convert to Integer, none of which has worked. I'm sure I just don't know the appropriate node for the conversion, and I'm hoping someone can point me in the right direction. Thanks!

Link to comment

Hello @EmilyArch,

Welcome to the Vectorworks forum!

 

I'm not sure why using both an integer and a float shouldn't work with the Less Than node.

Have a look at the screenshot and file here:

Int&Float-v2021.vwx

 

Less-Than.thumb.png.a4a3ea559e0874e08361c17b9390ec01.png

 

Still, in case you need a way to convert an integer into a float, right now the easiest way is to use the Function node and insert "float(x)" in the OIP as seen in the screenshot.

 

Regards,
Antonio

Link to comment
  • 2 weeks later...

Antonio,

 

Thank you so much for the response. It did not resolve the issue I was having, but it did help me to find a solution. I wanted to update this thread with the resolution I finally discovered. The issue is a glitch - I had renamed by dimension nodes with the dimension (eg: a node that measured 6" was named "6"). Those nodes did not function in the less than comparison. When I deleted those nodes and replaced them, this time naming them with words (eg: "Six"), the nodes, and thus the script, functioned.

 

I appreciate the help! I hope this will help someone else having a similar issue.

 

Best,

 

Emily

  • Like 1
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...