Dimension to sloped elements but by reference point

Hey @sovitek I duplicated your first script and noticed a couple of things. The dimensions were not going to the exact center of the elements. In the first clip below, the dim with the blue line beside it is the original dimensions pulled manually. The dim with the red line is the one created by your script. Also, when you try to change the location of the dim created by the script, the dim automatically skews to correspond to the angle of the element as shown in the second clip. I am fairly certain that these two issues are due to the references within the element itself being skewed.


2 Likes

Hi @staylor you are probably right,thanks, i have to admit i havent goin so deep into it…i will try play with that situation, when have some time…on my road to xmas…

1 Like

Enjoy your holidays and safe travels!

1 Like

@pranavnagure2k17
From what I can tell there is no way to select the element insertion points as references for dimensioning, like you can with the tab key when executing the native Revit Linear Dimension command. Maybe someone more knowledgeable than I, can confirm or provide input.

EDIT: I was able to find a work around. Instead of adding model lines to the family, add a reference line (not reference plane). The line needs to be at the insertion point of the element and needs to be in the Z axis direction. The reference line will become a Weak Reference by default. Then you can dimension to that reference. The script will pull all weak references, so there cannot be any other weak references in the family. Else the script will probably give an error or just fail. You will need to change the line axis in the script accordingly when doing horizontal or vertical dims.

Dim To Element Centers.dyn (22.8 KB)

2 Likes

@cmrlircon.bim Please reply back in your post so we don’t get this post off track. Thanks

1 Like