Hi!
I tried to write a simple python code for adding prefixes. Code below:
import sys
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.
Param = [0]
output = []
# Place your code below this line
i=0
for i in Param:
if Param[i] == "-3":
output.append("Rebar Hook: -3")
elif Param[i] == "-2":
output.append("Rebar Hook: -2")
elif Param[i] == "-1":
ouput.append("Rebar Hook: -1")
elif Param[i] == "1":
output.append("Rebar Hook: 1")
elif Param[i] == "2":
output.append("Rebar Hook: 2")
elif Param[i] == "3":
output.append("Rebar Hook: 3")
elif Param[i] == "8":
output.append("Rebar Hook: 8")
elif Param[i] == "9":
output.append("Rebar Hook: 9")
else:
output.append(Param[i]);
# Assign your output to the OUT variable.
OUT = output
The result is always returning as 0. Snip below
Any pointers would be nice!
Thanks!