Create Duct From CAD


Hi Kulkul,
I get the following error. I am newbie sorry for silly question but if there is any package I need to download please let me know

Current Document Custom Note: Error: Custom node definition is not loaded!

Another question can I use conduits instead of ducts?


I’m new on the forum I will not get used to rules

There is literally NO information in your post…

Why kulkul? What is the python script? have you searched for the missing node?


Where have you gotten the graph from might be a good place to start… That is where you should search for information on where the node is from, if you are just starting dynamo i would not go into using python just yet, and focus on actually reading and understanding the dynamo primer!

Why are you tagging kulkul? Why will you not get used to the rules?

1 Like

My English is weak

so I add for he wrote

That is the kind of link, information etc that needs to be present when you create a topic, you should read this:

I will just add the python script in case anyone want it:

import clr
from Autodesk.DesignScript.Geometry import *

# Import DocumentManager
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager

# Import RevitAPI
import Autodesk

# Import ToDSType(bool) extension method
import Revit
from Autodesk.Revit.DB import *
from Autodesk.Revit.Creation import *

# The imputs to this node will be stored as a list in the IN variable.
# doc = DocumentManager.Instance.CurrentDBDocument
uiapp = DocumentManager.Instance.CurrentUIApplication
app = uiapp.Application
doc = IN[0]
duct = Autodesk.Revit.Creation.Document

#create workset collector
Ducttype = IN[3]
#extract workset's name and ids
k = IN[1]
l = IN[2]

for i,j in zip(k,l):
	x= i.ToXyz()
	y= j.ToXyz()
	doc.Create.NewDuct(x, y, Ducttype);
OUT = id

“Current Document” is from the Archilab package…

As for this part, no you cannot create conduits using this script as on line 40 in the python script the method “NewDuct” from the API is used. You can if you desire have a look in the Revit API for the method of creating conduits. :slight_smile:

Lastly as far as I can see you still need to define the “ducttype” as the input of “IN[3]” in the python node.

1 Like

where we will enter the duct sizes