Dimension Unit Settings - Finding Styles That Don't Use Project Settings

Is there a way to find Dimension Types that are not using Project Settings, in particular dimension settings? I’ve tried both the Dimension.UsesProjectSettings and Dimension.Properties nodes from Rhythm and either they aren’t working or I’m expecting a different behavior from the node (most likely answer.)

Also looked through what I could find via the search - this thread seemed most relevant:

I created a blank project (template-none), then renamed one dimension style to Conforming, duplicate/rename to NonConforming, and then changed the unit settings for the latter. Both are reporting normally (or nulls) in the nodes mentioned above. - but like I said, I could be expecting a different behavior…

Ah, my nodes expects instances of dimensions rather than types. If it gets types, it converts it to null resulting in inaccuracies. If you want, just pull the python script and FilterByBool mask node from my custom node for now.

Thanks! :beers:

1 Like

well… I’m not getting anything to report as using project settings :thinking: This is using the Python from the Dimension.UsesProjectSettings node. I did try the other one as well but it didn’t do much for me in this instance.

Dimensions.rvt (308 KB)

Well darn. I’m going to bet I screwed something up in that node. Admittedly, it’s been a while since I have visited these ones. Let me take a closer look and fix it as necessary. :male_detective:

@Chad_Clary , do you wanna try this python script for me in place of the other one? Just paste this in the node. It seems like maybe I mistakingly used the wrong method before. It looks like there is something to determine if it uses default.

import clr
clr.AddReference('ProtoGeometry')
from Autodesk.DesignScript.Geometry import *

from System.Collections.Generic import *
# Import RevitAPI
clr.AddReference("RevitAPI")
import Autodesk

#unwrap all elements to use with API
dims = UnwrapElement(IN[0])

#Figure out if the dim type uses default and append true/false to list
formatOptions = list()
for i in dims:
	try:
		formatOptions.append(i.GetUnitsFormatOptions().UseDefault)		
	except:
		formatOptions.append(list())
		
#Assign your output to the OUT variable
OUT = formatOptions

The Python is returning an empty list, which results in a Specified Cast Is Not Valid error in the bool filter.

I did try adjusting the python to use DimensionType.GetUnitsFormatOptions() and that didn’t work either. I skimmed through the RevitAPI site but I’m out of my league at the moment…

Dang, alright. I will check it out. Not sure what is going on there.

I tried this in 2018 and it is at least partially working. I’m a moron and forgot to mention that I was trying all of this in 2016 - looks like some of the API related to dimensions changed between 2016 & 2018. The downside is the project I’m trying to check is going to be in 2016 for the foreseeable future :persevere:

I’ll see if I can get it running in 2018 at least.

Ahhhhhh. Yes. There it is. It wasn’t there before Revit 2017.1

hard to imagine we had no options for this prior to that.