Auto Dimension Family Instances

HI, everyone.
I made a script to dimension specific family instances according to the standards we use here.
The catch is for every object(family instance) that is not aligned in the direction of the normal coordinate system (0,0,0). I am creating a new coordinate system for the object so I can find the faces I need as a reference for the dimensions (There are nested components and a certain side Exterior face is a reference for dimensioning).
The script works perfectly for nom rotated elements but for rotated ones, one of the sides, some times eighter one is calculated inverted in the local coordinate system, that way my dimensions are inverted, the reference line is in the incorrect side of the object and so on.

Perfect dimensioning:

Rotated Family: (All teh references here are reversed, in some cases one side of the panel works fine and the other is reversed).
This is my dynamo scrip, and the two families on this example.
Auto dimension - IN Dev.dyn (121.1 KB)
1A- Wall Panel.rfa (948 KB)
1F- Header Panel.rfa (1.0 MB)

***** you need to have a Baseline dimension Type with Baseline in its name in order for everything to work.

I still don’t understand why, but reversing the direction of the angle did it for most cases.


Hi lucas,

I might give it a shot later.
But out of curiosity, have you checked the Facing Orientation and seen if there is any correlation between the facing orientation and the inversion you describe?

I remember it was the first thing I tried. I don’t remember the exact result, but I think it came out rotated as well. Thanks for trying! I appreciate the help.