Project Units

Currently there is an out-of-the-box node for Unit Types, but this node will only query four of them. The choices that are built into the drop-down list are as follows: Area, Insolation (solar), Length and Volume. Does anyone know why this node would not pull down ALL of the Project Units? …and not just the Common ones either, but also the MEP units as well. A request came in to extract these for a spreadsheet and I would like to mine that information with Dynamo.

Thanks

Like this?


units.dyn (4.6 KB)

1 Like

I am being blocked from loading a screen shot to show everyone, I will give your script a try

Thanks

My road blocks have been lifted, here is an image for this issueProject units.pdf (265.0 KB)

Hi,

I don’t usually revive older threads in forums but as I was searching for a way to convert project units from one system to another when I came across this thread. I’m curious about the 2 Python Script boxes in the image John posted. I have to admit that I’m still fairly new at Dynamo and my Python & Revit API knowledge is really basic and I just started a Python tutorial a couple nights ago. Now I was able to somewhat replicate a result similar to the result in the first box but that is about as much as I can figure out.

…and here is my very basic code! haha.:smile:

import clr
clr.AddReference('RevitAPI')
from Autodesk.Revit.DB import *

result = FormatOptions()

#Assign your output to the OUT variable.
OUT = result

I realize that I’m probably not even close but I was just trying random stuff from looking up things to do with units in the 2016 API document.

I would like to learn how to do what John’s scripts are doing to retrieve the project units information. Hopefully as I get through the tutorial I’ll have a better understanding of how this was done. I don’t want to be a “take the code and run” kind of guy, but if someone is able to offer an explanation of some kind as to what is happening in the two scripts it would be appreciated. Sort of along the lines of “you need to do such such in a loop” or someting like that, hopefully you get my meaning.

Cheers,

Jason