Grasshopper

algorithmic modeling for Rhino

Hi, recently I have been trying python in grasshopper. 

Does anyone know how to convert this C# script(with Timer) to python script? 

I just can not figure out.... 

would be very appreciate, thanks! 

CSharpTimer.gh

Views: 8954

Replies to This Discussion

Thanks, but does that apply to lists as well? I mean can "Lists" be carried over from one iteration to the next in a loop?

Thanks

I have no success to solve exactly the same issue. Note: I am Python beginner. 

values = []

if reset or "counter" not in globals():
  print "reset"
  counter = 0
  values = []
else:
  counter += 1
  print "counting"
  values.append(counter)

a = counter

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service