Access Units in Code Blocks

I am trying to access units in the code block. Can’t seem to find them.
Is this possible?

Thank you in advance!

Can you show what you’ve tried?


Trying to figure out how ot convert between units without using the units node.

I don’t believe you can call the “units” node (called Convert Between Units) into a codeblock… You could use simple math to convert between units e.g.

2 meter to milimeter

“x = 1000” in a codeblock will “convert” from meters to milimeters

I was looking for something which would recognize the document units and allow me to automate this part of the script. Otherwise, users will need to set this up each time.

The problem is that we are working on large projects in Revit 2017 (no user input for dynamo) and we receive a lot of external files which require data mining.

Thank you! :slight_smile:

Maybe have a look in these threads: