# Auto dimension question for MEP element

**URL:** <https://forum.dynamobim.com/t/auto-dimension-question-for-mep-element/17543>\
**Category:** Revit\
**Created:** [December 19, 2017, 8:57pm UTC](https://forum.dynamobim.com/t/auto-dimension-question-for-mep-element/17543 "2017-12-19T20:57:49Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![dxia](https://avatars.discourse-cdn.com/v4/letter/d/65b543/32.png) [@dxia](https://forum.dynamobim.com/u/dxia)\
**Post date:** [December 19, 2017, 8:57pm UTC](https://forum.dynamobim.com/t/auto-dimension-question-for-mep-element/17543/1 "2017-12-19T20:57:49Z")

</div>

Hi everyone,

I am new to Dynamo and I am interested in learning it to resolve some time consuming work.

I am a MEP engineer and I usually need to spend much time on dimension all the pipes and ducts in the model so I have a idea that what if I can automatically create dimension for all the elements I need. I start some research and I found some useful topics in Forum like, [Quick Dimension Question]([http://Quick](http://Quick) Dimension Question), [Automatic dimensioning of (multiple) detail lines]([http://Automatic](http://Automatic) dimensioning of (multiple) detail lines).

My work requires me to tag the pipes and ducts dimension based on closest detail line in the view like the screen shot here

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/5/7/570ced29904636ec7a1d2e5881ceb525b62e3145.png)  
Therefore, after read some of the topics I have the following thoughts about to realize the goal:

1. Select all the pipe/duct elements and the detail line I need to use as a reference line
2. Find the closest detail line for each pipe/duct
3. Create the dimension between the pipe/duct and the closest detail line.

So far, I have achieved the step 2 and I am wondering how to realize the next step. From my knowledge I have the thought that I can create a perpendicular line between the pipe and the closest detail line and use the node " Dimension detail line" and I can have dimension for each element. However, I could not find a way to create a line only based on the two lists of elements. I will attach my dynamo script in the topic and I am welcome any suggestions and new thoughts!  
[AutoDimension.dyn](https://forum.dynamobim.com/uploads/short-url/qlhaVOgsWI0Y7N2y58Gfbu8mZRe.dyn) (16.7 KB)

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/3/2/3285fbc7a58d89d0040f44eb50a3cb7cb3541125.jpg)  
Thanks!

---

<div class="post-metadata">

**Author:** ![Ingrid.by](https://avatars.discourse-cdn.com/v4/letter/i/9f8e36/32.png) [@Ingrid.by](https://forum.dynamobim.com/u/Ingrid.by)\
**Post date:** [November 26, 2018, 2:29pm UTC](https://forum.dynamobim.com/t/auto-dimension-question-for-mep-element/17543/2 "2018-11-26T14:29:17Z")

</div>

Did you get it? I have this same problem and I do not solve the final solution

---

<div class="post-metadata">

**Author:** ![rohitt9KQ3L](https://avatars.discourse-cdn.com/v4/letter/r/e95f7d/32.png) [@rohitt9KQ3L](https://forum.dynamobim.com/u/rohitt9KQ3L)\
**Post date:** [January 17, 2020, 6:12am UTC](https://forum.dynamobim.com/t/auto-dimension-question-for-mep-element/17543/3 "2020-01-17T06:12:20Z")

</div>

I also tried to solve this problem, But also having the same problem. Did anyone solved it? If solved please help us or share the picture or file of solution

---

<div class="post-metadata">

**Author:** ![J\_y\_Fx](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/j_y_fx/32/124635_2.png) [@J\_y\_Fx](https://forum.dynamobim.com/u/J_y_Fx)\
**Post date:** [October 25, 2021, 11:24am UTC](https://forum.dynamobim.com/t/auto-dimension-question-for-mep-element/17543/4 "2021-10-25T11:24:53Z")

</div>

Hi,  
Did someone get an working example of this?

I’m using dimension by elements reference but have no successful way to control it.  
Example 1 dimension per element.
