Geoff Overfield Geoff Overfield - 4 years ago 170
C# Question

How to programmatically extend a Pipe in Revit

I have a very particular circumstance in which I need to be able to extend the length of a pipe by a particular magnitude.   I've tried various methods - none of which work.  They include:

Pipe.Location.Move(XYZ fVector); //This moves a Pipe element by the specified vector
XYZ.Add(XYZ source); //I have no idea what this does, but it didn't move my XYZ variable that was my pipe end point

...And I know there's more things I've tried, but I can't recall them at the moment.  I've searched online and have come up empty-handed as well.  If anyone knows of a good way to extend a Pipe's length by any means, it would be a monumental help!

Answer Source

I think you can very easily set the pipe start and end points simply by assigning a geometry curve to its Location property.

Look at my series of posts on creating a rolling offset:

It tests and demonstrates all kinds of ways to define pipe start and end points, fitting locations, and the connections between them.

I am not saying it is exhaustive, but it will certainly provide all you need to answer your question.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download