I’m developing stadium seating using Dynamo and Generative Design. I have encountered a problem in that my Python code in a node that is giving me an output of * (no value). I started to debug it using a simple OUT_debug output to see which node caused the error. I’ve found that the node script below is giving me no output. Is this a limitation with Revit 2021 Generative Design? The node script is not complex nor is it using any special libraries. This node is part of a larger script flow, but it seems to be the one that is causing a problem as I’m debugging.
- Select a Revit Detail Line and convert to poly curve
- IN are doubles and int for setting the distance.
- OUT is the array of offset, original curve, and debug
import clr clr.AddReference('ProtoGeometry') from Autodesk.DesignScript.Geometry import * # Selected Revit detail line converted (Polycurve) curve = IN # Seating offset T (double) offset = IN # Row offset (int) D = IN # Eye offset from rear (double) T = IN # Row offset X value (int) x = IN # Top of riser Y value (int) y = IN # size of field (int) fieldSize = IN / 2 # focal distance (double) F = IN #debug output OUT_debug = 555 # inital point at edge of field pt = Point.ByCoordinates(x + fieldSize, y, 0) # distance from point to loft curve distance = Geometry.DistanceTo(pt, curve) OUT_offsetCurves =  # offset curves to create seating for i in offset: curveEdge = i - F + distance seatCurve = curveEdge + (D - T) x = Curve.Offset(curve, seatCurve) OUT_offsetCurves.append(x) # Original focus curve OUT_focusCurve = Curve.Offset(curve, -F) OUT = OUT_offsetCurves, OUT_focusCurve, OUT_debug
Below is an image of the debug output. I would assume that this would have the give 555, but if the node is not compiling it will give a null result. I also assume that is the node is giving a null it also will not generate any geometry.
If you have any information on what might be causing this any help would be much appreciated.