Spot Dimensions vs. Dimensions

I have a script which allows a user to change the fonts of all Dimensions and Spot Dimensions Types in a model by editing the values of four inputs (Font, Size, Italic, and Width Factor). The image below is the portion of the script for Dimension Types. When I run the script, it modifies the fonts for both Dimensions and Spot Dimension Types. It also finds four additional Dimension Types which do not contain the parameters I’m trying to edit. I have a total of 33 Dimension and Spot Dimension Types defined within my model, but it’s finding a total of 37. I have the same script for Spot Dimensions, which only finds and modifies the 22 Spot Dimension types I have defined.

My questions:

What could those four additional Dimension Types be? The script does what it’s supposed to do, but throws an error.

I think I’m okay with the script modifying both Dimension and Spot Dimension Types because they will most likely use the same font properties. Is there a way to filter out Spot Dimensions if I did want to apply different properties?

I’ve attached the portion of the script dealing with Dimension Types.

Change Project Fonts_Error.dyn (12.4 KB)

Fonts

There are some ‘hidden’ dimension styles which have to exist in a given project in order for Revit to do Revit things. Within the normal working environment, there are unfindable as the UI filters them out so you’ll never see them. If you select them by ID in Revit, you’ll see they have odd parameters relative to every other dimension style (none of which are editable by direct selection though), as they just show as ‘other’ in the properties pallet.

I would drop these right off the bat by getting the value for type name and testing to see if it isn’t an empty string. if it is - drop it. if it isn’t, proceed as usual.

After that, you can group your remaining dimension styles by the family name. This isn’t immediately intuitive until you look into the list of all 77 or so parameters applied to all dimension styles to see what the quickest way to reduce the set is (I had 77 to chose from in the architectural template).

This works (in node form or code block form) like so

:

1 Like

Thanks Jacob! That solved my problem.

1 Like