Anyone used PostableCommand to store newly created element IDs, etc

i used PostableCommand in Revit API C# plug-in, not Python in Dynamo environment, what i’m thinking is using Parallel Pipe command to create 2 set of pipes in UI then automatically join them via MEPover Elbow.ByMEPCurves, doable?

Been awhile since I considered it, but I recall at the time that it was not doable due to the nature of transactions - not sure you can post the command mid transaction.

In the parallel pipes example, admittedly I haven’t used the parallel pipe tool since like 2018 so I may be missing something, but likely wouldn’t be too hard to duplicate the center curve path to generate the left and right curves and produce the pipes from that.

thanks jacob, i did use duplicate/offset center curve approach, only works partially due to center curve orientation issue, good sorting curves algorithm in Python is desired, not only order of curves but also order of start/end point of curves

Sounds like the Dynamo polycurve node set would do what you need (assuming the sequence of curves can be joined into a polycurve, you can then offset and do the fillets if/as needed. Hard to say without seeing the current project though.

1 Like

sounds a good idea, polycurve actually consist of the sorted curves, but cannot offset 3D (non-planar) polycurve

I would first remove the vertical components and then generate the polycurve, offset each, regenerate the vertical components at the start/end of the associated offset polycurve, and then form the network by joining.

This won’t work if your polycurves are not planar between risers though (likely most are so a non-issue perhaps).

In those cases you might consider making them planar, doing the steps above, and then adding the slope via piping controls or by projecting the offset curves onto the geometry you want to follow.

right, complex but doable, don’t know if Rhino/Grasshopper can offset 3D polycurve, Revit is not good at geometry afterall

Not sure I entirely agree on that, though I completely agree with much of the sentiment. Revit is quite impressive for many things which it does; the problem is most (if not all) of those tools are provided inside other tools and not exposed for use in customizations. Stuff like the building envelope analyzer, path of travel tool, automated room and space boundaries, automatic area boundaries at exterior of the building, the whole plan topology class, parametric association of elements, element joins, and more that we just take for granted that few other tools on the market even attempt to approach. And that’s before we get into the massing and adaptive component environments.

I do wish more of these tools were officially exposed to developers; so many things which we struggle with are just under the surface in these other tools - you yourself noted that the offset pipes tool does what you’re after. Often the issue is that if the tools are used outside the specific context the UI constrains them to. Revit is after all a BIM tool, and the curve generation tools for the offset pipes algorithm works within that context. But if you were to try to use it without the sketch plane provided by the underlaying tool (as in your example) the offsets get quite tricky, and most tools which allow it work unpredictably or require very specific data sets (thinking to the old CAD tool rules like ‘all geometry must be drawn in the +X +Y quadrant; curve loops must be clockwise, etc.).

I will keep advocating for more and more exposure as I can; in the meantime hopefully we can come up with a viable path in the interim. By any chance have you looked at this class? Revit API 2026 Documentation

thanks jacob for the insight, Revit is more powerful for sure as it’s actually a database, for geometry, perhaps sketch plane is the main reason for most if not all limitations, i believe i used CurveLoop class in C# before but for different purpose.