Place af fitting and connect it to pipe

I am trying to get dynamo to place fittings on my pipes at every wall penetration. Using the FamilyInstance.ByPoint, i have been able to place my family at every penetration. However i can’t get it to connect with the pipe. I have tried FamilyInstance.ByHostAndPoint and MEPFitting.ByPointsAndCurve and i can’t get them to work.

What i am trying to get dynamo to do:

What i am getting:

Hi @niels.overgaard

What you do you mean by connecting it to the pipe?

Hi @Daan

When i insert it manually it attaches itself to the pipe, expand to fit the pipe, and it moves with the pipe.

hi @niels.overgaard

I have no experience with pipes and stuff, but maybe you could use the diameter of the pipe to change the diameter of the fitting

Silly question but have you checked the inner and outer diameter?