Change the slope of a Pipe

Dear Fellow Users,

I’m now working a few months with Dynamo and I now all the basics etc. I created allready on my own a script to create Levels and views and place them automaticly on the right sheets, created a calculation for my water and automaticly change the diameter and more. However, when it comes to plumbing/sanitary, I have a few questions.

Changing the Diameter is not the problem. I know that officialy you can’t see the flow on a sanitary object but if I change it in dynamo to something else (say cold water), it has no problem to find the flow. However, a imported thing about sanitary is the slope because the slope can be determinative for the diameter. With some UI inputs from the ‘GeniusLoci’ pack, I can let the user select the slope they want. However, setting the slope is something different. If I do it the usual way of changing the Diameter, it gives this error messages:


Now I’ve allready search a lot on the internet today and I found that there is a simple button in Revit itself. It’s called Slope Editor

Once you select the Slope Editor you can change the slope

However, I want to do that automaticly using Dynamo. Is there any way to communicate with this tab using dynamo/Python? I feel like it is possible because there is even a button for this and it’s easy to use but you need to select first only the pipes that are flat and that takes a lot of work while in Dynamo you can easy filter on allready sloped, non-sloped and standing pipes.

If you need more information, please let me know. I hope that I can find as soon as possible a sollution so I can complete this calculation programm.

Hello there,
What you can do is get the location of the pipe, wich gives you a curve, get the start and end point, offset the endpoint by slope*lenght, get a new line from this new endpoint, and then create a new pipe from this line and delete the previous one.
I guess there could be a more straight way to do it, I just dont know it. I leave you a screenshot of how it would be:

Note that this would “disconnect” the pipes from the fitting, as it would delete your original pipe( the deletion part is not in the screenshot). Also, this would only work for one pipe at the time.

For multiple pipes, I leave you a script I used for Conduits, and ascending slope. You would have to modify it quite a bit in order to work for you.pendiente conduit.dyn (51.0 KB) (some things are in spanish, as its my native language)

1 Like

Thank you for your reaction but sadly that doesn’t work for me. When the pipes get disconnected (because I redrawn it) It isn’t possible to change the Diameter to the calculation. I’ve tried it but it also only drawns a single line on the right point but not keeping it connected and then the flow will also be disconnected. If you or someone else has a sollution to this, that can be great.
When I found a sollution or a way to the sollution, than I keep you updated.