# Python code + Generative Design = Output \*

**URL:** <https://forum.dynamobim.com/t/python-code-generative-design-output/65011>\
**Category:** Generative Design\
**Tags:** revit, python, dynamo\
**Created:** [June 11, 2021, 5:55am UTC](https://forum.dynamobim.com/t/python-code-generative-design-output/65011 "2021-06-11T05:55:58Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Danny.bF79V7](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/danny.bf79v7/32/90736_2.png) [@Danny.bF79V7](https://forum.dynamobim.com/u/Danny.bF79V7)\
**Post date:** [June 11, 2021, 5:55am UTC](https://forum.dynamobim.com/t/python-code-generative-design-output/65011/1 "2021-06-11T05:55:58Z")

</div>

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

```auto
import clr
clr.AddReference('ProtoGeometry')
from Autodesk.DesignScript.Geometry import *

# Selected Revit detail line converted (Polycurve)
curve = IN[0]
# Seating offset T (double)
offset = IN[1]
# Row offset (int)
D = IN[2]
# Eye offset from rear (double)
T = IN[3]
# Row offset X value (int)
x = IN[4]
# Top of riser Y value (int)
y = IN[5]
# size of field (int)
fieldSize = IN[6] / 2
# focal distance (double)
F = IN[7]

#debug output
OUT_debug = 555

# inital point at edge of field
pt = Point.ByCoordinates(x[0] + fieldSize, y[0], 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.

 ![20210610_Stadium Computational Design ERROR](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/c/2/c277484ed19cbb59666c8e0c3926e6c0645246c8.png)

If you have any information on what might be causing this any help would be much appreciated.

Kindest Regards,  
Danny Bentley

---

<div class="post-metadata">

**Author:** ![jacob.small](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jacob.small/32/161030_2.png) [@jacob.small](https://forum.dynamobim.com/u/jacob.small)\
**Post date:** [June 11, 2021, 12:01pm UTC](https://forum.dynamobim.com/t/python-code-generative-design-output/65011/2 "2021-06-11T12:01:39Z")

</div>

Do you have a remember node to serialize the geometry dat from Revit into the graph? You can test if this is the issue by looking. At the graph in Dynamo Sandbox instead of Dynamo for Revit.

---

<div class="post-metadata">

**Author:** ![Danny.bF79V7](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/danny.bf79v7/32/90736_2.png) [@Danny.bF79V7](https://forum.dynamobim.com/u/Danny.bF79V7)\
**Post date:** [June 14, 2021, 3:45am UTC](https://forum.dynamobim.com/t/python-code-generative-design-output/65011/3 "2021-06-14T03:45:00Z")

</div>

Hi Jacob,

It worked. I had forgotten to add the remember node. I have added the link to the documenation incase someone else runs into the same issue.

> **[Data.Remember Node Inputs](https://www.generativedesign.org/03-hello-gd-for-revit/03-07_using-revit-alongside-gd-for-revit/03-07-02_data-remember-node-inputs)**

Kindest Regards,  
Danny Bentley
