I am working on a script that will subdivide a list of elements based upon the elements’ location within the Revit project. I am having an issue with getting my python script behave properly. It provides the following warning message:
Warning: IronPythonEvaluator.EvaluateIronPythonScript operation failed. Traceback (most recent call last): File "<string>", line 48, in < module > TypeError: expected Point, got XYZ
How would I go about converting XYZ values into Point Values?
Here is my full script:
# Enable Python support and load DesignScript library import clr clr.AddReference('ProtoGeometry') from Autodesk.DesignScript.Geometry import * clr.AddReference("RevitAPI") from Autodesk.Revit.DB import * clr.AddReference("RevitAPIUI") from Autodesk.Revit.UI import * clr.AddReference("RevitServices") from RevitServices import * clr.AddReference("RevitNodes") import Revit clr.ImportExtensions(Revit.Elements) # The inputs to this node will be stored as a list in the IN variables. taktNames = IN #All Names of TAKT Areas in Project. Via ScopeBox elemsScBoxs = IN #All Elements of ScopeBox in Project boundBoxScope = IN #All ScopeBoxes convert to BoundingBox elemsFabPrt = IN #All Fabrication Parts in the Document fabBBMidPnt =  #Centroid of all Fabrication Parts' BoundingBox ReturnElems =  # of sublist is name of TAKT, followed by elems in that TAKT tuple = taktNames # Place your code below this line elements = UnwrapElement(elemsFabPrt) fabBBMidPnt = for e in elements: bb = e.get_BoundingBox(None) if not bb is None: center = bb.Min+(bb.Max-bb.Min)/2 fabBBMidPnt.append(center) max= min= for x in boundBoxScope: max.append(x.BoundingBox.MaxPoint) min.append(x.BoundingBox.MinPoint) #OUT = [max, min] LIST= for x in boundBoxScope: for i in fabBBMidPnt: if x.BoundingBox.Contains(i) == true: OUT = i # Assign your output to the OUT variable. OUT = LIST #OUT = [taktNames, elemsScBoxs, boudBoxScope, elemsFabPrt, fabBBMidPnt] #OUT = "Sure"