Auto Dimensions for plumbing pipes from fitting to fitting

I’m trying to write a script that can help me automate the process of adding dimensions to plumbing piping. My goal is to have a dimension line following the routing of the piping from a fitting to another one, for some reason I’m getting a null, can anyone help?


@Alban_de_Chasteigner is this something that you can help me with please?

Can you post a screenshot with all node elements expanded? Hard to get where the error is without more information.

Not knowing anything about fitting families, my guess is that each has a pretty big list of references. You probably need to filter those based on orientation (maybe all those perpendicular to the location line of the pipe you want dimensioned). Then you will probably need to sort them into a list, again- along that pipe… so you have a “Start” and End" reference for each dimension you want added. the “Start” would be one side of one fitting and the “end” would be the correct reference for the next fitting along the path.

I suspect that you are just dumping a bunch of references into the Dimension.ByReferences node and basically telling it “Good Luck”.

For example, a single structural column generates 14 face references. There are many more- edge references, point references, etc… As in regular Revit, you can only dimension between parallel references (Or at least start with 1 planar ref and then go for point refs from there). I would try to pass the Dimension.ByReferences a constructed list of sublists, each containing 2 parallel references. That is what you are doing “by hand” when you do it in the Revit UI manually.

Hi @AismailMPH3Y try get your end/startpoint reference from genius loci

fDxjIKHaXL

1 Like

@sovitek, can you post a blowup of your script? It looks like you are getting references for the pipes rather than the fittings. That is not what the OP asked for, but it certainly seems easier that what I suggested!

1 Like

yeah you are right ; ) but hopefully these are connected

Here for the fittings :wink:

1 Like

Does the FamilyInstance References node also come from GeniusLoci?
Does it return a list of references/planes?
If so, how did you know which one to use? Trial and error?

1 Like

yeah its from genius loci…and return a list :wink: yes can be difficult, probably better with family instance reference origin havent tried very rare i dim from fitting to fitting…normally just the pipe itself…was just a test :slight_smile:

1 Like

yeah a test with reference origin…much better and should work in almost every situation i guess :wink:

1 Like