Critical path sections

Hello to all,
I want to pick up all section included in Duct pressure loss as Critical path and to perform Graphical override (basically to select all elements and to colour them).

Now, I did take a look to the Revit API documentation, there you can find a Method GetCriticalPathSectionNumbers, link:
https://www.revitapidocs.com/2015/b68ff5b9-e8cf-2565-2b50-03a8d2489ac3.htm

Now, there is a code for C#, VB and Visual C++. I know that Dynamo can use Python but I do not know how to use any of those languages. :frowning:

Can someone help me with this method? How Python script need to look and which input I need to provide to that script in order to have (as an output) list of section from the critical path?

Thank you in advance.

1 Like

Hi @nndkovacevic

You can do with one line of python code this way:

1 Like

Thank you very much Kulkul. That do the trick. :grinning:

Hi Kulkul,

based on above topic/post the python gives critical path ids. however from say overall elements in a duct system in a view , the section numbers are available only for ducts not for air terminals or fittings or shoe branches etc. hence from python node after comparison i am getting only ducts in critical path.
please refer below image:



as you can see for other elements the property “Section” & hence i cannot compare it with critical path of the same system section ID.
any chance to get critical path for other elements part of same duct system. how do you think that could be achieved?