Inserting dimensions between centers of fittings

Hey there,

I’m on a mission to be able to insert aligned dimensions between standard fittings on a selected view.

The measurement needs to be from both centers. Like that basically:


I identified a couple of step to accomplish this:

  1. Get all pair of fittings that each pipes are connected to (I used MEPover to accomplish that)
  2. Get the center points using Element GetLocation node so I end up with pairs of points
  3. Create lines for each pair of points
  4. Offset the line so i can place the dimension
  5. Insert all the dimensions

Here’s the script:

Dimensions_center_fittings.dyn (1.1 MB)

So I tried using the Dimension ByReferences node, but I’m clearly using it wrong since I have a null result. I’m pretty sure that its the way I’m using the references input of the Dimensions ByReferences node that is wrong.

How can this be solved?

Hi @Sam.B,

The input References allows Autodesk.Revit.DB.Reference, a specific class of the API.
Use the Element Origin Reference node.

This is really interesting because it is not possible to reproduce the example below in Revit without the help of Dynamo.

Dimension Pipe fittings.dyn (16.9 KB)

1 Like

Thanks for the prompt response,

This looks like a much more efficient way to accomplish the task. I’ll study this as I wish to further understand how the Revit API works as I’m nowhere near a BIM Designer, but rather a software engineer who just jumped into the world of Revit :slight_smile:

@Alban_de_Chasteigner I could get the dynamo script you provided to insert a dimension, however, I am not able able to make it work using multiple pipes as I would expect multiple dimensions to be inserted. I would actually expect one dimension to be inserted per pipe in input.

Also, even though I’ve seen a dimension inserted in the output of the script, I couldn’t actually see the dimension in the view, probably because I’ve got a message like below that I am currectly unable to identify what is wrong.

Reference Invalid

Thanks again for your generous time helping on this topic (And the whole site too :slight_smile: )

Hi Samuel,

You have to show your graph with the previews enabled under the nodes and that you add the .dyn file to have an accurate help. And it will be even better if you add a sample Revit file.

@Alban_de_Chasteigner There is a requirement change on whats needed for my work, so inserting many dimensions is no longer required. I’ve decided to mark your first post as the solution of the OP.

Thank you for your help!

1 Like

At first, thank you for the entire GeniusLoci package. I have a question similar like Sam. I want to create a dimension between two pipe fittings. I did create a very simple example. So I did select two elbows and they have references and points. From points, I did create a line. When I connect everything, as a result, I have some dimension at the output but that dimension is not visible in any view (I did try 3D, floor plan and section).

Can you tell me what is wrong with my example? Thank you in advance.

Sample Revit file and script are on the following link:

Hi Nenad,

The explanation is simple. It looks like the elbows mut be aligned on the same axis :

Instead of the elbows, use the pipe with the Element Points References node :

Hi Alban,
Thank you for your response. I did try with the pipe but by using that way I will have a dimension from the start point of the pipe to the end point of the pipe which is not technically correct. On the drawings, we should have dimension between the center of one pipe to the center of the next pipe. I did try to use Pipe central line as a reference but again I receive dimensions from the start of the pipe to the end of the pipe. Do you have some idea how that can be done? Thank you in advance.

A workaround : You could draw a line between the fittings origin points and dimension this line.
Another idea, if you can materialize a point at the origin of your family, it is then possible to obtain a reference of this point.

1 Like