I am currently trying to create a dynamo script that will dimension specialty equipment in order to save some time with producing piece drawings.
Being new to dynamo, I modified a Grid to Grid script I copied to see if i could make it work for specialty equipment. Currently the error I am getting is saying “The direction of the dimension is invalid”.
It is a work in progress and I know it is probably missing a lot of nodes but any help is greatly appreciated.
I don’t know what your specialty equipment is, but it is likely a family with (possibly) lots of references. You say you started with a script that dimensioned Grids, and that is an easier task. A grid (most often, as long as it’s not a multi-segment grid) is a single line or plane, and therefore only has one reference to dimension to.
If you need to dimension to a specific reference in a placed family instance (of your “specialty equipment”) then you will need to filter out the references of the placed family you want to dimension and pass those to the dimension node. (Remember, in Revit, you’re not dimensioning the objects themselves, you’re dimensioning the objects’ references.)
This thread tackles a similar problem, with walls instead of family instances.
Also, I think that you need to be passing a single curve to the “Line” input of the Dimension.ByElements node. If I recall correctly, that is the location (and direction) of the dimension itself, and all references need to be perpendicular to it. I can’t tell what the Element.Curves node is returning in your example when you feed it all Specialty Equipment elements, but it’s unlikely a line.