# Dimension by elements

**URL:** <https://forum.dynamobim.com/t/dimension-by-elements/106496>\
**Category:** Revit\
**Tags:** dynamo\
**Created:** [December 11, 2024, 12:41pm UTC](https://forum.dynamobim.com/t/dimension-by-elements/106496 "2024-12-11T12:41:11Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![cmrlircon.bim](https://avatars.discourse-cdn.com/v4/letter/c/e36b37/32.png) [@cmrlircon.bim](https://forum.dynamobim.com/u/cmrlircon.bim)\
**Post date:** [December 11, 2024, 12:41pm UTC](https://forum.dynamobim.com/t/dimension-by-elements/106496/1 "2024-12-11T12:41:11Z")

</div>

Hi all,

I want to take annotations on center to center of the elements using dynamo. manually it takes a lot of time so please help me to resolve

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/2/a/2a7d9aba2b1bd33e6cfe319f9b5b2f4a6ceaa737.png)

---

<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:** [December 11, 2024, 1:39pm UTC](https://forum.dynamobim.com/t/dimension-by-elements/106496/2 "2024-12-11T13:39:16Z")

</div>

Your best option would be to use reference dimensioning. The link below is to a recent post I responded to with code on how to get a reference by it’s name. This of course would depend on how you have the element family setup in relation to the reference lines and making sure there is a named reference line at the location that you are wanting to dimension to. Example would be pulling the default “CenterLeftRight” or “CenterTopBottom” reference and dimensioning to that. If you create your own references, make sure to name them and set their reference type (i.e. strong, weak, etc). Of course there would be a little more involved, such as setting up a line for the dimension line placement location. But that too can be automated with a pick point.

In addition to this post, there are several other posts within the forum that discusses this. Just need to search for them.

> [@Dimensioning electrical MEP elements](https://forum.dynamobim.com/t/dimensioning-electrical-mep-elements/106227):
>
> Hi there, I have been searching for automatic dimensioning everywhere, but only found architectural dimensioning. I’m working with electrical elements that seemingly just work different. I can extract Points from them and create line in between etc. But the Dimension.ByElement does not accept Lines as such. Kinda stuck at this point. Any help?

---

<div class="post-metadata">

**Author:** ![cmrlircon.bim](https://avatars.discourse-cdn.com/v4/letter/c/e36b37/32.png) [@cmrlircon.bim](https://forum.dynamobim.com/u/cmrlircon.bim)\
**Post date:** [December 12, 2024, 8:26am UTC](https://forum.dynamobim.com/t/dimension-by-elements/106496/3 "2024-12-12T08:26:26Z")

</div>

I tried but its not working will you please share me the dyn script?

---

<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:** [December 12, 2024, 1:02pm UTC](https://forum.dynamobim.com/t/dimension-by-elements/106496/4 "2024-12-12T13:02:10Z")

</div>

I don’t have an active script. I just put an example together in the other post, but didn’t keep it. Show what you have tried and we can go from there.

---

<div class="post-metadata">

**Author:** ![cmrlircon.bim](https://avatars.discourse-cdn.com/v4/letter/c/e36b37/32.png) [@cmrlircon.bim](https://forum.dynamobim.com/u/cmrlircon.bim)\
**Post date:** [December 12, 2024, 7:40pm UTC](https://forum.dynamobim.com/t/dimension-by-elements/106496/5 "2024-12-12T19:40:47Z")

</div>

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

I got the error of “The references are not geometry reference.”

I have point based family so it wont take it as a reference

---

<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:** [December 12, 2024, 8:01pm UTC](https://forum.dynamobim.com/t/dimension-by-elements/106496/6 "2024-12-12T20:01:09Z")

</div>

Take a look at this post then for point references.

> [@Dimension to sloped elements but by reference point](https://forum.dynamobim.com/t/dimension-to-sloped-elements-but-by-reference-point/106523):
>
> Hello everyone, I am trying to create linear dimensions for elements by points. I initially attempted to use auto-dimension, I tried using the ‘Dimension.ByReference’ Node, which dimensioned by referencing the left/right planes, leading to incorrect dimension values. The attached image shows the red-colored dimensions created by the script and the green-colored dimensions, which are the expected correct dimensions. Is there a solution to dimension points to points without using reference plan…

---

<div class="post-metadata">

**Author:** ![cmrlircon.bim](https://avatars.discourse-cdn.com/v4/letter/c/e36b37/32.png) [@cmrlircon.bim](https://forum.dynamobim.com/u/cmrlircon.bim)\
**Post date:** [December 12, 2024, 8:11pm UTC](https://forum.dynamobim.com/t/dimension-by-elements/106496/7 "2024-12-12T20:11:46Z")

</div>

Not working

---

<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:** [December 12, 2024, 9:05pm UTC](https://forum.dynamobim.com/t/dimension-by-elements/106496/8 "2024-12-12T21:05:57Z")

</div>

I have never tested with the point references. If I get time, I will see what I can find, but will have to defer to others for help from this point. Sorry!

---

<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:** [December 19, 2024, 1:14pm UTC](https://forum.dynamobim.com/t/dimension-by-elements/106496/9 "2024-12-19T13:14:29Z")

</div>

See if this helps you out now. There is additional stuff in this post.

> [@Dimension to sloped elements but by reference point](https://forum.dynamobim.com/t/dimension-to-sloped-elements-but-by-reference-point/106523):
>
> Hello everyone, I am trying to create linear dimensions for elements by points. I initially attempted to use auto-dimension, I tried using the ‘Dimension.ByReference’ Node, which dimensioned by referencing the left/right planes, leading to incorrect dimension values. The attached image shows the red-colored dimensions created by the script and the green-colored dimensions, which are the expected correct dimensions. Is there a solution to dimension points to points without using reference plan…

---

<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:** [December 19, 2024, 4:38pm UTC](https://forum.dynamobim.com/t/dimension-by-elements/106496/10 "2024-12-19T16:38:54Z")

</div>

This is in response to your comment in the other post.

The dimensions are based on the location of the reference line placement in the family. So you need to make sure the reference is placed at the location you want to dimension to. If you have more than one reference in the family, you will have to cycle through them to find the correct one. Since reference lines cannot be named, it will be difficult to set it up with consistent results every time you run the script.
