# Center to center dimension of linked elements

**URL:** <https://forum.dynamobim.com/t/center-to-center-dimension-of-linked-elements/70375>\
**Category:** Revit\
**Tags:** dynamo\
**Created:** [November 15, 2021, 8:47am UTC](https://forum.dynamobim.com/t/center-to-center-dimension-of-linked-elements/70375 "2021-11-15T08:47:48Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![shashank.baganeACM](https://avatars.discourse-cdn.com/v4/letter/s/35a633/32.png) [@shashank.baganeACM](https://forum.dynamobim.com/u/shashank.baganeACM)\
**Post date:** [November 15, 2021, 8:47am UTC](https://forum.dynamobim.com/t/center-to-center-dimension-of-linked-elements/70375/1 "2021-11-15T08:47:48Z")

</div>

Hi all,

I am trying to generate dimension for the linked elements by selecting the element node with reference to the line. I am getting this error. Please help me out the solution for the error. (in the select model element, I have selected the model line drawn. ![Detail line marking](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/e/5/e53cadfa299e8b7681746ce601032bf2ae58b642.png)

 ![Error of dimension](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/3/9/39ceb4cd30a27f2cce71180781e99716089a4e3f.png)

---

<div class="post-metadata">

**Author:** ![honeyjain619](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/honeyjain619/32/121215_2.png) [@honeyjain619](https://forum.dynamobim.com/u/honeyjain619)\
**Post date:** [November 15, 2021, 9:19am UTC](https://forum.dynamobim.com/t/center-to-center-dimension-of-linked-elements/70375/2 "2021-11-15T09:19:09Z")

</div>

Hello @shashank.baganeACM ,

I am not sure, but can you try to convert link element to elements from this node and check  
or change the lacing from auto to longest  
 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/c/a/cab24b36f5db031fa9209d81c4a1dd567d5b567a.png)

---

<div class="post-metadata">

**Author:** ![shashank.baganeACM](https://avatars.discourse-cdn.com/v4/letter/s/35a633/32.png) [@shashank.baganeACM](https://forum.dynamobim.com/u/shashank.baganeACM)\
**Post date:** [November 17, 2021, 6:53am UTC](https://forum.dynamobim.com/t/center-to-center-dimension-of-linked-elements/70375/3 "2021-11-17T06:53:33Z")

</div>

@honeyjain619 I have used the node but I am still getting the same error like “Invalid number of references”

Can you please tell me why I am getting this error ?

 ![Invalid number of references](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/1/a/1ac23da8d404e6068880772cc9db69948713a78d.png)

---

<div class="post-metadata">

**Author:** ![shashank.baganeACM](https://avatars.discourse-cdn.com/v4/letter/s/35a633/32.png) [@shashank.baganeACM](https://forum.dynamobim.com/u/shashank.baganeACM)\
**Post date:** [November 18, 2021, 9:48am UTC](https://forum.dynamobim.com/t/center-to-center-dimension-of-linked-elements/70375/4 "2021-11-18T09:48:19Z")

</div>

@honeyjain619 I have modified my graph slightly but still I am not able get the dimension. Can you please help me out for this ?

 ![Centre to centre dimension between linked elements](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/a/f/af35846213df7285ea8eec4b0610352e0eb61b86.png)

---

<div class="post-metadata">

**Author:** ![honeyjain619](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/honeyjain619/32/121215_2.png) [@honeyjain619](https://forum.dynamobim.com/u/honeyjain619)\
**Post date:** [November 18, 2021, 11:55am UTC](https://forum.dynamobim.com/t/center-to-center-dimension-of-linked-elements/70375/5 "2021-11-18T11:55:24Z")

</div>

@shashank.baganeACM ,  
can you please share both .rvt and this .dyn file for the reference.  
So i will try my best to help you in this case.

---

<div class="post-metadata">

**Author:** ![Alban\_de\_Chasteigner](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/alban_de_chasteigner/32/39650_2.png) [@Alban\_de\_Chasteigner](https://forum.dynamobim.com/u/Alban_de_Chasteigner)\
**Post date:** [November 18, 2021, 12:42pm UTC](https://forum.dynamobim.com/t/center-to-center-dimension-of-linked-elements/70375/6 "2021-11-18T12:42:50Z")

</div>

Hi,

What package does the Dimension.Create node come from?  
Use instead the _Dimension ByReferences_ and _Convert Linked Reference_ nodes.

 ![Dimension ByReferences](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/b/d/bd1b101e5722a8551fae899f6451824a19625978.png)

---

<div class="post-metadata">

**Author:** ![shashank.baganeACM](https://avatars.discourse-cdn.com/v4/letter/s/35a633/32.png) [@shashank.baganeACM](https://forum.dynamobim.com/u/shashank.baganeACM)\
**Post date:** [November 19, 2021, 10:02am UTC](https://forum.dynamobim.com/t/center-to-center-dimension-of-linked-elements/70375/7 "2021-11-19T10:02:53Z")

</div>

Hi @Alban_de_Chasteigner you can find Dimension.Create node from Archilab package.

If I use this Dimension Byreferences and Convert Linked reference nodes still I will get the same error or warning. Can you please tell me how can I resolve my issue ?

---

<div class="post-metadata">

**Author:** ![Alban\_de\_Chasteigner](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/alban_de_chasteigner/32/39650_2.png) [@Alban\_de\_Chasteigner](https://forum.dynamobim.com/u/Alban_de_Chasteigner)\
**Post date:** [November 19, 2021, 10:04am UTC](https://forum.dynamobim.com/t/center-to-center-dimension-of-linked-elements/70375/8 "2021-11-19T10:04:00Z")

</div>

Hi,

Show the graph and the error content please.

---

<div class="post-metadata">

**Author:** ![shashank.baganeACM](https://avatars.discourse-cdn.com/v4/letter/s/35a633/32.png) [@shashank.baganeACM](https://forum.dynamobim.com/u/shashank.baganeACM)\
**Post date:** [November 19, 2021, 10:04am UTC](https://forum.dynamobim.com/t/center-to-center-dimension-of-linked-elements/70375/9 "2021-11-19T10:04:34Z")

</div>

I can share only the dynamo file and it is not possible to share the main project file. and I am trying to generate dimensions between two plumbing fixtures which are in the linked model loaded into main project.

[Automate dimension for linked elements.dyn](https://forum.dynamobim.com/uploads/short-url/9HQR2FiOYx3IDZuApzIxhE3ooAB.dyn) (33.8 KB)

---

<div class="post-metadata">

**Author:** ![Alban\_de\_Chasteigner](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/alban_de_chasteigner/32/39650_2.png) [@Alban\_de\_Chasteigner](https://forum.dynamobim.com/u/Alban_de_Chasteigner)\
**Post date:** [November 19, 2021, 10:44am UTC](https://forum.dynamobim.com/t/center-to-center-dimension-of-linked-elements/70375/10 "2021-11-19T10:44:56Z")

</div>

It is working fine if you stick with the _Genius Loci_ package and collect the correct reference Planes :

 ![Automate dimension for linked elements](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/2/4/2416e854eb26b2ca579ad477c3aa9bbc0e397bd1.png)  
 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/c/8/c88f7d362c1e3809600b7ae385d6ab8a5f65983c.png)

---

<div class="post-metadata">

**Author:** ![shashank.baganeACM](https://avatars.discourse-cdn.com/v4/letter/s/35a633/32.png) [@shashank.baganeACM](https://forum.dynamobim.com/u/shashank.baganeACM)\
**Post date:** [November 19, 2021, 11:08am UTC](https://forum.dynamobim.com/t/center-to-center-dimension-of-linked-elements/70375/11 "2021-11-19T11:08:20Z")

</div>

Yes @Alban_de_Chasteigner but if I try to give a dimension then my output is showing null

 ![output is null](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/6/c/6c6e9706352dbadd40bf3ad25d7aac211e8252a3.jpeg)

---

<div class="post-metadata">

**Author:** ![Alban\_de\_Chasteigner](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/alban_de_chasteigner/32/39650_2.png) [@Alban\_de\_Chasteigner](https://forum.dynamobim.com/u/Alban_de_Chasteigner)\
**Post date:** [November 19, 2021, 11:11am UTC](https://forum.dynamobim.com/t/center-to-center-dimension-of-linked-elements/70375/12 "2021-11-19T11:11:33Z")

</div>

Remove the uneccessary @L2 on the FamilyInstance Reference ByType node.  
Your input references is a list of list and should be a list.

---

<div class="post-metadata">

**Author:** ![shashank.baganeACM](https://avatars.discourse-cdn.com/v4/letter/s/35a633/32.png) [@shashank.baganeACM](https://forum.dynamobim.com/u/shashank.baganeACM)\
**Post date:** [November 22, 2021, 5:16am UTC](https://forum.dynamobim.com/t/center-to-center-dimension-of-linked-elements/70375/13 "2021-11-22T05:16:30Z")

</div>

Hi @Alban_de_Chasteigner

I am getting dimension as output but if you see the inputs in graph, everything shows null n]values but it is giving me output. May I know the reason for this ? I am bit confused and to get the output successfully, I have to run the script twice, then only it gives dimension.

So I just wanted to know why I ma facing such weird behavior of script ?

 ![Null error](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/9/e/9ee2313c9aefa5d9fd88582ed639a8988ebc9c46.png)

---

<div class="post-metadata">

**Author:** ![Alban\_de\_Chasteigner](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/alban_de_chasteigner/32/39650_2.png) [@Alban\_de\_Chasteigner](https://forum.dynamobim.com/u/Alban_de_Chasteigner)\
**Post date:** [November 22, 2021, 8:24am UTC](https://forum.dynamobim.com/t/center-to-center-dimension-of-linked-elements/70375/14 "2021-11-22T08:24:56Z")

</div>

Hi,

That’s weird. You need to restart Revit and Dynamo, this is not normal behavior.
