Dimension between pipes and walls

Hi!
I’m trying to make an automated dimensions between pipes and walls.
I managed to do the script like on the photo below, but it gives me a lot of dimensions which lay in the same line (second photo) and I have trouble to do exact thing what I want…

I would like to have one horizontal line which measure from one side od the wall to the center of the pipe and to antoher wall. I would like to have measured both sides of wall in this dimension.


Do you have any idea how to do that? I would be really grateful for help :slight_smile:

Welcome to the community!

GeniusLoci package has what you need.
Wall Edges References - provides both interior and exterior face wall edges and corresponding references. This provides both top of wall and bottom of wall edges/references, so you will need to filter to just one reference per each face of the walls.
Element Reference - this will get the centerline reference of the piping.
Dimension ByReferences - this creates the dimension using the inputted references.

Thank you!
I was looking on this package earlier but I couldn’t find out how it exacly works.
After your quick explanation I managed to make one line dimension between walls edges - so thank you:)


But I have a problem when I add references of the pipes - then it looks like the dimension is creating, but when I click on it, Revit shows this warning:
image

I thought that maybe it’s in hidden layer, but after unhide everything nothing changed.
Do you know maybe what can I do with that? My script now:

I believe that issue is caused when you are dimensioning to things that are out of plane with each other. But not certain about that. Apologies.

Hopefully someone else can help provide insight on that. There may be other post in the forum about that very subject. Try searching and see.

Okay, but thank you anyway!

Thinking about this some more. If your piping is not perfectly horizontal to the view, then that could be what’s causing the dimension to be out of plane with the any view that’s in the project. So you are getting the message. You may can try getting the centerline of the piping and translate that line to be parallel to the view plane. Then get the reference of the line and dimension to that.

Hmm I tried to make what you wrote, but Revit still shows the same warning.


Let me know if it is what you meant, because I don’t have any other idea how to make it.
Btw. it is possible to create one line dimension between center of pipes using Dimension.ByElements node (but then I have on one line dimensions to pipes and on another line dimensions to walls edges, while I need to have all dimensions in one dimension line).

Try using the view plane. This will also help if you are trying to dimension in a section view instead of a plan view. It should work as long as all lines are parallel and flat, but I’m sort of speculating at this point.

image

One thing to mention. Since you are using the reference of the lines and not the piping, the dimensions will not be linked to the piping. So if the piping moves, the dimension will not update automatically.

1 Like

Thanks for an advice! I tried those code blocks which you sent, but unfortunately it nothing changed - I still see the warning in Revit.

In that case, I would suggest that you provide a simplified version of your model and the Dynamo script, so we can mimic your steps.

Okay, I made quick simplified version of my model and in this project the script is working…

So just now I have to figure out why in my more complicated project it’s not working.
Many thanks for your answers!