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,
I want to sort pipe fittings as per end.ie one end fitting,two end fitting,three end fitting.
Hi @bikashseas
What do you mean by that. Could please show screenshot and drop dummy rvt file here if you want clean solution. Thanks
@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?
read only parameters
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
@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…
@bikashseas It would be better if you could start a new thread for this (Your other query) as the original query has been solved.
Yes I need this.
Thanks and regards
Bikash
Okay…Thanks
Should be something like that I think.
Sharing is caring
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
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
@Kulkul
Okay…Thanks
@Kulkul
Hi,
Please share the above codes.
Thanks