So i had a node that was taking a CSV file and converting it into points. In version 0.6.3 it worked pretty well, now I converted to 0.7.1 and I am experiencing some unusual behavior. For some reason when using this code:
import clr
clr.AddReference(‘ProtoGeometry’)
from Autodesk.DesignScript.Geometry import *
# Import RevitAPI
clr.AddReference(“RevitAPI”)
import Autodesk
from Autodesk.Revit.DB import *
import clr
clr.AddReference(“RevitNodes”)
import Revit
# Import ToProtoType, ToRevitType geometry conversion extension methods
clr.ImportExtensions(Revit.GeometryConversion)
#The inputs to this node will be stored as a list in the IN variable.
dataEnteringNode = IN
#Split single string at line breaks into a list of strings
xyzList = IN[0].rsplit(’\n’)
# Cull the last line, which is blank
del xyzList[len(xyzList)-1]
ptList =
for xyz in xyzList:
xyz = xyz.replace("{","")
xyz = xyz.replace("}","")
tpt = xyz.rsplit(’,’)
ptList.append(Autodesk.Revit.DB.XYZ(float(tpt[0]),float(tpt[1]),float(tpt[2])).ToPoint())
#Assign your output to the OUT variable
OUT = ptList
I am getting a different result then when using Dynamo Code Block to generate points…ideas?
Hint. Its the Dynamo Code block that is giving me a correct result, but why is Python output wrong?
Thanks!