Auto-dimensioning Script for Revit

Trying to write a script that can auto-dimension the distance between components. I have seen plenty of tutorials on how to auto dimension a certain component in reference to grid lines but can’t quite figure out how to dimension one component to another.

Ideally would try to automate the process of dimensioning conduit from the side of a hanger in a running dimension type style from a particular view.

There are actually quite a few posts in the forum about dimensioning to elements other than grid lines and walls. Just have to critique your search words to find the right ones. Below are a couple for you.

To help, GeniusLoci has two nodes that you will need: “Element Reference” and “Dimension ByReferences”.