Create Duct From CAD

HELP ME

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?

@Kulkul

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?

3 Likes

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:
https://forum.dynamobim.com/t/how-to-get-help-on-the-dynamo-forums/4677

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

import clr
clr.AddReference('ProtoGeometry')
from Autodesk.DesignScript.Geometry import *

# Import DocumentManager
clr.AddReference("RevitServices")
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager

# Import RevitAPI
clr.AddReference("RevitAPI")
import Autodesk

# Import ToDSType(bool) extension method
clr.AddReference("RevitNodes")
import Revit
from Autodesk.Revit.DB import *
from Autodesk.Revit.Creation import *
clr.ImportExtensions(Revit.Elements)
clr.ImportExtensions(Revit.GeometryConversion)

# 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()
	TransactionManager.Instance.EnsureInTransaction(doc)
	doc.Create.NewDuct(x, y, Ducttype);
OUT = id
TransactionManager.Instance.TransactionTaskDone()

“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