#geconnecte pipe ophalen
refs = []
for x in pipe_fitting:
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)
#section van buis ophalen
s_names = []
keys = []
for r in refs:
section_name = "test"
keys.append(section_name)
OUT = refs
When I change the “test” in section_name = r.get_Parameter(RDB.BuiltInParameter.RBS_SECTION).AsValueString()
I received this error.
I know that I need to look deeper but what is the best way?
I have the same problem with grouping and set parameter values
for r in refs:
for x in refs:
for y in refs:
section_name = y.get_Parameter(RDB.BuiltInParameter.RBS_SECTION).AsValueString()
keys.append(section_name)
Did you get the same error when you added the extra loops?
I’m still a beginner in Python but I know your error says you’re feeding it a list and the way round that is to add a loop. I’m sure someone more qualified will be along soon but in the mean time have you tried breaking the thing you’re looping down in a different way? I usually find copying the bit that’s not working to a fresh Python node and working out exactly what I am feeding it what it’s spitting out at what stage helps.