Combine Pipe Elements Seamlessly

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I seem to be struggling with combining two pipe elements seamlessly.
Let's say I have two pipes that had a coupling between them but are otherwise of uniform pipe type, diameter, etc... I would like to programatically delete the coupling and join the pipes together into a continuous run. Essentially the opposite of PlumbingUtils.BreakCurve
In the UI if you delete the coupling then drag one end onto the other it will work as desired and turn the two pipes into one continuous pipe length.
I have tried a number of approaches and must be overlooking something simple.
If you use Pipe.Create between the two pipe connectors it will create the short segment of pipe and connect them, but you now have three pipes.
If you modify the Location.Curve of one pipe to extend it to the end of the second pipe and use Connector.ConnectTo you end up with 2 pipes still.
Trying to manual send Document.AutoJoinElements() does not appear to do anything.
Attempting to mimic the result from the manual UI input is important to maintain any additional Tap connections etc... so replacing the second pipe by extending the first pipe and remaking all connections is preferably avoidable. When performing the action via the UI the new seamless pipe has the same ID as the dragged extended pipe (expected) and all taps that were previously on the second pipe maintain their original ID implying they were not recreated.