Duct by Line

Duct by Line

hariharanradha098
Explorer Explorer
440 Views
1 Reply
Message 1 of 2

Duct by Line

hariharanradha098
Explorer
Explorer

Hi everyone,

I hope you're all doing well.

I'm encountering an issue while trying to convert a line into a duct using Dynamo and Python. Whenever I run my script, Dynamo becomes unresponsive, and Revit eventually stops working. I have to close Revit using the Task Manager each time this happens.

I've tried using both packages and Python scripts, but the issue persists. This problem has been occurring from Revit 2022 to 2025.
Same thing happening for conduit and pipes

Can anyone explain why this might be happening and suggest a solution?

Thank you in advance for your help!

sysType = (UnwrapElement(IN[0]))
dtType = (UnwrapElement(IN[1]))
lvl = (UnwrapElement(IN[2]))
stPt = (UnwrapElement(IN[3]))
enPt = (UnwrapElement(IN[4]))

tempList = []


#Here we starting the Transaction
TransactionManager.Instance.EnsureInTransaction(doc)

#Here we need to Do all Revit API Operations

dt = Duct.Create(doc,sysType.Id,dtType.Id,lvl.Id,stPt.ToXyz(),enPt.ToXyz())

0 Likes
441 Views
1 Reply
Reply (1)
Message 2 of 2

jeremy_tammik
Alumni
Alumni

This looks like a pure Dynamo question to me. In that case, the best place to discuss is in the Dynamo forum:

  

  

Regarding the question you are working with, you might want to check out the duct and pipe placeholder functionality discussed in the post:

  

  

Btw, I asked Gemini, what revit api class represents pipe placeholders? It replied:

   

The Revit API class that represents pipe placeholders is Pipe.

  • Key Properties:

    • IsPlaceholder: This boolean property determines whether a given Pipe object is a placeholder or a regular pipe.  
  • Creation:

    • Pipe.CreatePlaceholder(): This static method is used to create placeholder pipes within a Revit document.  
  • Conversion:

    • PlumbingUtils.ConvertPipePlaceholders(): This method is used to convert a set of placeholder pipes into actual pipes with defined routing and connections.  

In summary:

While the Pipe class itself represents both regular pipes and placeholder pipes, the IsPlaceholder property distinguishes between them. This allows you to identify and work specifically with placeholder pipes within your Revit API applications.

    

Placeholders

https://help.autodesk.com/view/RVT/2025/ENU/?guid=Revit_API_Revit_API_Developers_Guide_Discipline_Sp...

    

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