# Auto-dimensioning Script for Revit

**URL:** <https://forum.dynamobim.com/t/auto-dimensioning-script-for-revit/95239>\
**Category:** Revit\
**Tags:** revit, geometry, dynamo\
**Created:** [November 6, 2023, 5:02pm UTC](https://forum.dynamobim.com/t/auto-dimensioning-script-for-revit/95239 "2023-11-06T17:02:43Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jerod.desmetBH36V](https://avatars.discourse-cdn.com/v4/letter/j/8edcca/32.png) [@jerod.desmetBH36V](https://forum.dynamobim.com/u/jerod.desmetBH36V)\
**Post date:** [November 6, 2023, 5:02pm UTC](https://forum.dynamobim.com/t/auto-dimensioning-script-for-revit/95239/1 "2023-11-06T17:02:44Z")

</div>

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.

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/5/6/567aa600e242cd43c2269fdb7aa76956d3daf6be.png)

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.

---

<div class="post-metadata">

**Author:** ![staylor](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/staylor/32/94307_2.png) [@staylor](https://forum.dynamobim.com/u/staylor)\
**Post date:** [November 6, 2023, 6:35pm UTC](https://forum.dynamobim.com/t/auto-dimensioning-script-for-revit/95239/2 "2023-11-06T18:35:21Z")

</div>

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”.

> [@How to Dimension on the General Model in Dynamo?](https://forum.dynamobim.com/t/how-to-dimension-on-the-general-model-in-dynamo/94166):
>
> Hello, I assembled general models using Dynamo. I prepared the sheets. However, I want to dimension my sheets in detail view. I’ve tried what was done on walls before, but it didn’t work. Anyone have any suggestions? [image]

> [@Dimension between pipes and walls](https://forum.dynamobim.com/t/dimension-between-pipes-and-walls/91692):
>
> Hi! I’m trying to make an automated dimensions between pipes and walls. I managed to do the script like on the photo below, but it gives me a lot of dimensions which lay in the same line (second photo) and I have trouble to do exact thing what I want… I would like to have one horizontal line which measure from one side od the wall to the center of the pipe and to antoher wall. I would like to have measured both sides of wall in this dimension. Do yo…
