Ive been trying to make this straight of code work for a while but I keep runnig into the same problem ToXyz line 43 I’ve tried completely throwing it out it will cause a syntax error
LearnDynamo_Module_2 (dynamo 2.0) V2 (2).dyn (94.2 KB)
Your points are Dynamo points so the UnwrapElement()
is not required
modelPoints = UnwrapElement(IN[2])
If you are converting Dynamo to Revit it is best practice to use the following imports
clr.AddReference('ProtoGeometry')
from Autodesk.DesignScript.Geometry import *
clr.AddReference("RevitNodes")
import Revit
clr.ImportExtensions(Revit.Elements)
clr.ImportExtensions(Revit.GeometryConversion)
You don’t have to convert a Dynamo point to XYZ
to get the values as it already has X
, Y
and Z
attributes
If you are working with lists you will also get an error
I believe you may want to sometimes convert to XYZ so that it can be dealt with via the API, and also Dynamo coordinates report unitless whilst XYZ reports in feet.
2 Likes