Hi,
@kennyb6 wrote this awesome python code to order things by closest to the next thing. However this Revit project is giving me this error. Unsure what it is if anyone can help.
Revit 2018.3 and Dynamo 1.3.4
# Enable Python support and load DesignScript library
import clr
clr.AddReference('ProtoGeometry')
from Autodesk.DesignScript.Geometry import *
# The inputs to this node will be stored as a list in the IN variables.
t0 = IN[0] # Wall Elements
t1 = IN[1] # Wall Centerpoints
t2 = [] # Final sorted list
t9 = [] # Final sorted centerpoints
t3 = [] # Start Point closest to t8
t8 = Point.ByCoordinates(-99999,-99999,0) # Point used as origin
for _subP,_subC in zip(t1,t0):
_subT = []
_Cen = []
t3 = t8
while len(_subP) > 0:
t5 = []
for i in _subP:
t5.append(Geometry.DistanceTo(t3, i))
t6 = min(t5)
t7 = t5.index(t6)
_subT.append(_subC.pop(t7))
t3 = _subP.pop(t7)
_Cen.append(t3)
t2.append(_subT)
t9.append(_Cen) # Add t9 to output for sorted geom
OUT = t2
Unsure if its related but this node seems to be giving out on the floors as well
tests with the floors got same error