Changing Slope of MEP part before placing it

Changing Slope of MEP part before placing it

Pinchus_Main
Explorer Explorer
544 Views
4 Replies
Message 1 of 5

Changing Slope of MEP part before placing it

Pinchus_Main
Explorer
Explorer

I want to be able to toggle between slope UP and DOWN using a hotkey when placing new MEP parts. See attached screenshot

 

Capture-1.PNG

 

 

 

I have achieved a similar functionality of changing pipe to hot water, cold water, storm, vent etc. using hotkeys using pyRevit. So, I have a basic understanding of how to work with different elements in Python/pyRevit. But based on my research so far, I think that I need to have the element that I want to manipulate already added to the document if not selected. Now I am dealing with parts that I am yet to add to the document. Is there a way to programmatically achieve this? Any help in this direction is highly appreciated.

0 Likes
Replies (4)
Message 2 of 5

jeremy_tammik
Alumni
Alumni

I asked the devteam for you.

  

Jeremy Tammik Developer Advocacy and Support + The Building Coder + Autodesk Developer Network + ADN Open
0 Likes
Message 3 of 5

jeremy_tammik
Alumni
Alumni

The devteam reply: Unfortunately, the setSlope method was not exposed to the public API. Possibly, there was some concern that it could have been also used for fittings since fabrication parts can be all types of parts not just curves like design components. We will have to look into adding something for fabrication straights.

  

Jeremy Tammik Developer Advocacy and Support + The Building Coder + Autodesk Developer Network + ADN Open
Message 4 of 5

Pinchus_Main
Explorer
Explorer

Oh.. Is there a possible workaround for it? 

0 Likes
Message 5 of 5

jeremy_tammik
Alumni
Alumni

I am not aware of any alternative Revit API support for this.

  

Of course, if you hack and dig deep enough, you can achieve anything you want using the Windows .NET API and native libraries, cf.:

 

http://thebuildingcoder.typepad.com/blog/2011/01/ribbon-spying-and-ui-automation.html

http://thebuildingcoder.typepad.com/blog/2011/01/automate-designoption-and-64-bit-add-in-templates.h...

  

Jeremy Tammik Developer Advocacy and Support + The Building Coder + Autodesk Developer Network + ADN Open
0 Likes