Is there a specific reason you are doing this in Python? With some simple DesignScript you can also achieve this, just plot this code into a Code Block:
NumberList = range (5,60,8)
resultList = []
for x in NumberList:
if x<30:
result = "Potato"
else:
result = "Tomato"
resultList.append(result)
OUT = resultList
What do you mean? That code does exactly what you’d expect. Each number in NumberList returns Potato if <30 or Tomato if not. What were you expecting as the output?
Yes, i was wondering why this test code works but my other code not.
I´m sorry it seems that it was just a list level problem, it works now. Had to add a list level to the angles.
for grids, angles, view in zip(gridList, angleList, viewList):
for grid, angle in zip(grids, angles):
if angle<90 and angle>45:
grid.ShowBubbleInView(DatumEnds.End1,view)
grid.HideBubbleInView(DatumEnds.End0,view)
else:
grid.ShowBubbleInView(DatumEnds.End0,view)
grid.HideBubbleInView(DatumEnds.End1,view)