Anuncios
Welcome to the Revit Ideas Board! Before posting, please read the helpful tips here. Thank you for your Ideas!
Comentario
Contributor
Contributor

@jeremy_tammik 

Thank you for looking at this problem.
To help any person investigating into this, here is what I mentionned to you on another page:

 

I tinkered something that works even though I dont't actually know why it does work.
I noticed that the FamilyInstance that I spawn always had doc.GetElement(MagicConnector.Id).Location.Point = XYZ(0,0,0)
All the time, even if I clearly see the object on the face of the pipe in the model.
So i just added a line of code before the "ConnectTo" and a 1mm "Offset from Host" to the familyinstance:
MagicConnOffsetfromHost = getParamObj(MagicConnector,"Offset from Host")
MagicConnOffsetfromHost.Set(1/304.8)
doc.GetElement(MagicConnector.Id).Location.Move(XYZ(0,0,0))
connecfrom = list(MagicConnector.MEPModel.ConnectorManager.UnusedConnectors)
connecfrom[0].ConnectTo(Connecto)

TaDam!
Now it works with vertical pipes.

I can send you the complete python code if needed.

Thanks for the quick reply!