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