I’m using the Ampersand package by @colin.mccrone with Revit 2020 and Dynamo 2.3. I’m noticing that some of the nodes keep failing. They run once, but then if a change is made (say in Revit), they don’t work again. I’m aware that Python nodes need to be retriggered but even disconnecting and reconnecting the node doesn’t seem work. Restarting Revit sometimes works.
The node, in particular, I’m having issues with is the Geometry.SplitByTools.
Extracting the Python code from within reveals an error:
Warning: IronPythonEvaluator.EvaluateIronPythonScript operation failed. Traceback (most recent call last): File "<string>", line 33, in <module> AssertionError
What does this mean? Line 33 is: newPieces.append(Flatten2D(Geometry.Split(piece,tool)))
# # Colin McCrone # Twitter: https://twitter.com/colinmccrone # LinkedIn: https://www.linkedin.com/in/colinmccrone # Updated: 2016-05-15 # import clr clr.AddReference('ProtoGeometry') from Autodesk.DesignScript.Geometry import * def Flatten2D(ls): flat =  for x in ls: if type(x) is list: for y in x: flat.append(y) else: flat.append(x) return flat # Main function geom = IN tools = IN pieces =  pieces.append(geom) for tool in tools: assert type(tool) is not list newPieces =  for piece in pieces: assert type(piece) is not list newPieces.append(Flatten2D(Geometry.Split(piece,tool))) pieces = Flatten2D(newPieces) OUT = pieces
I see that Springs (@Dimitar_Venkov) has a ‘Geometry.SplitRecursively’ node. But for geometry like this, how would you define the ‘pick point’ input?