The CLR. AddReference (' ProtoGeometry ')
The from Autodesk. DesignScript. Geometry import *
# Import RevitAPI
The CLR. AddReference (" RevitAPI ")
The import Autodesk
# Import DocumentManager and TransactionManager
The CLR. AddReference (" RevitServices ")
The import RevitServices
The from RevitServices. Personal import DocumentManager
The from RevitServices. The Transactions import TransactionManager
# Import ToDSType (bool) the extension method
The CLR. AddReference (" RevitNodes ")
The import Revit
The from Autodesk. Revit. DB import *
The from Autodesk. Revit. Creation import *
The CLR. ImportExtensions (Revit. Elements)
The CLR. ImportExtensions (Revit. GeometryConversion)
Doc=DocumentManager. Instance. CurrentDBDocument
FirstPoint=[0] IN
SecondPoint=[1] IN
Level=UnwrapElement (IN [2])
PipeType=UnwrapElement (IN [3])
SystemType=UnwrapElement (IN [4])
Outpipes=[]
# the create transaction
TransactionManager. Instance. EnsureInTransaction (doc)
For I, x in enumerate (FirstPoint) :
Pipe.=Autodesk Revit. DB.. Plumbing pipe. The Create (doc, systemType. Id, pipeType. Id, level. The Id, FirstPoint [I] ToXyz (), SecondPoint [I] ToXyz ())
Outpipes. Append (pipe. Id)
TransactionManager. Instance. TransactionTaskDone ()
OUT=outpipes

I've tried, 36 before is good, how to solve, thank you!
CodePudding user response:
An error is very clear, have a variable assignment had operation directlyCodePudding user response:
I doubt the problem is not I asked
CodePudding user response:
This kind of problem step Debug and have a look