Creating a script to dimension specialty equipment

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.

Good luck!
Joe