Python Attribute Error

Hi All,
The bellow code I used some days before.It was working fine.
@T_Pover Wrote this for me.But Its not working now.

import clr
from Autodesk.DesignScript.Geometry import *
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager

#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:

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

It looks like the input is not a pipe fitting or maybe it’s nothing at all. Can you put a watch node between the nodes to see what’s going into the python node or share your .rvt + .dyn file.

1 Like

Revit File

B.dyn (2.8 KB)

@bikashseas Looks good to me. Restart your PC and see if that helps.

1 Like

Yeah, same here, works fine.

1 Like

Yes ,Its working…
Thanks All.:slight_smile: