Splitting Conduit in Dynamo causes resizing and disconnecting

Hi Dynamo folks!

In a given Revit file, I would like to add couplings at specified places along conduit. Manually, when using the split tool, we are able to add the coupling and retain the relationship between both pieces of conduit and the coupling (when you select then tab, the entire run is selected).

We’ve been able to get pretty close to a solution in Dynamo, that allows us to select a detail line and intersecting conduit, then split the conduit at that point and add a coupling. There are two issues, however, that make this current solution unusable:

  1. Instead of splitting the conduit, the section of conduit is replaced with two new conduits (each with new ids). These two pieces of conduit and the associated coupling no longer have a relationship. Selecting and tabbing shows they are no longer considered part of the run.

  2. The replacement conduit is of the wrong diameter. We haven’t been able to figure out how to create 2" conduit and couplings where the default is 1".

If anyone knows of a solution to either (or both) of these problems, I’d greatly appreciate the insight!

@bakewell

I’m not sure the way I visualized it is the same as your current situation but here’s some thoughts:

  1. It indicates your original conduit being deleted while 2 new conduits were added. You could assign a new curve to Location property of the original conduit in order to keep it as one of resulting segments. Try calling copy methods such as CopyElement() instead of re-modeling with creation methods.

  2. Not sure which function you are calling, my experience tells me that Document.NewUnionFitting(Connector c1, Connector c2) will flex to the size of your MEPCurve Element. What if you adjust its size right after creation (set parameter value)? Or how about you just place it to the right spot and calls Connector.ConnectTo(Connector c) later.

I’m also curious about why you are using a line to intersect with conduit. If you are trying to create equal segments then this intersecting line won’t be necessary. Those points are already on conduit’s LocationCurve. You can offset its start point or using curve-parameterization to get your “intersection”, for example.

1 Like