Pipe Fitting Sorting According to End

Hi,
I want to sort pipe fittings as per end.ie one end fitting,two end fitting,three end fitting.


Like the bellow image.How can I do this?

Hi @bikashseas

What do you mean by that. Could please show screenshot and drop dummy rvt file here if you want clean solution. Thanks :slight_smile:

1 Like

@Kulkul
Hi,
I want to set parameter value for
25 dia end cap=25.1
25 dia elbow=25.2
25 dia reducer =25.2
25 dia Tee=25.3
25 dia reducing Tee=25.3

32 dia end cap=32.1
32 dia elbow=32.2
32 dia reducer =32.2
32 dia Tee=32.3
32 dia reducing Tee=32.3

like above,is it possible?

It is possible but it is a bit complex, and need extra nodes,
unless there is some package that we can access this data?

  1. best option is to access Connector manager as you can see what is connected, which system etc…
    however need write python script or custom nodes to get this data,

read only parameters

  1. get access to read only parameter like connection_diamaeter1 etc…
    make sure you check names for all fittings you have as they can vary,
    this is also not accessible by standard nodes

1 Like

Maybe this is of some help, it returns the number of connectors per fitting.

here’s the code:

import clr
clr.AddReference('ProtoGeometry')
from Autodesk.DesignScript.Geometry import *
#The inputs to this node will be stored as a list in the IN variables.
fittings = UnwrapElement(IN[0])
listout = []

for x in fittings:
	listout.append(x.MEPModel.ConnectorManager.Connectors.Size)

#Assign your output to the OUT variable.
OUT = listout

or you could try this which will give you the part type (elbow,union, tee, etc.):

import clr
clr.AddReference('ProtoGeometry')
from Autodesk.DesignScript.Geometry import *
#The inputs to this node will be stored as a list in the IN variables.
fittings = UnwrapElement(IN[0])
listout = []

for x in fittings:
	listout.append(x.MEPModel.PartType)

#Assign your output to the OUT variable.
OUT = listout
5 Likes

@T_Pover
Thank you very much.


@T_Pover
Your codes helped me lot.Can you please give me some
code to find fittings host pipe.Thank you very very much.
Regards
Bikash

Hmm I don’t believe Revit handles pipes as hosts to the fittings. Every fitting (except for caps) has at least 2 pipes connected, so in the best case I can think of some code that will return 2 or more pipes per fitting.
If that’s what you need let me know…

1 Like

@bikashseas It would be better if you could start a new thread for this (Your other query) as the original query has been solved.

1 Like

Yes I need this.
Thanks and regards
Bikash

Okay…Thanks

@T_Pover @bikashseas

Are you looking for this?

1 Like

Should be something like that I think.
Sharing is caring :slight_smile:

Here’s what I’ve got:

import clr
clr.AddReference('ProtoGeometry')
from Autodesk.DesignScript.Geometry import *
#The inputs to this node will be stored as a list in the IN variables.
fittings = UnwrapElement(IN[0])
refs = []

for x in fittings:
	connset = x.MEPModel.ConnectorManager.Connectors
	conn_pipes = []
	for c in connset:
		if c.IsConnected:
			for lc in c.AllRefs:
				conn_pipes.append(lc.Owner)
	refs.append(conn_pipes)

#Assign your output to the OUT variable.
OUT = refs

11 Likes

@T_Pover

Yes,You got it…awesome.
Thanks again.Keep sharing…

It is fine.Can you please share the code?

@bikashseas it is same as @T_Pover code. The only difference was i extracted separately “Refs” and then “Owner”.

Next time if you have more than one query ask separately each query to keep it tidy. Thanks :slight_smile:

@Kulkul
Okay…Thanks

@Kulkul
Hi,
Please share the above codes.
Thanks