Query document for metric or imperial

For now, I’m checking if the length is Millimeters or Fractional inches and that seems to work for ninety percent of our files. But what if one is Feet & Inches or Centimeters etc., If I have to query for each possible variation that feels more like a switch statement than a boolean. Is there not a way of just checking for metric or imperial more directly?
I’ve thought about giving the UI a toggle, but I’m supposed to get out of the technicians’ way, not slow them down with more questions. There should be a way to ask the document instead of the operator.

ForumDemoMetricImperial.dyn (162.7 KB)

Hi @TurtleWolfe,

Yes it is possible to add the units system to the custom node.

Download the up-to-date version of the Document Units node on Github and replace the old node in C:\Users\%USERNAME%\AppData\Roaming\Dynamo\Dynamo Revit\2.13\packages\Genius Loci\dyf.
(or wait for an update of the package)

1 Like

awesome and thanks for a such a quick response

wait, you just committed that 3 minutes ago, that’s even more awesome!

1 Like