Grasshopper

algorithmic modeling for Rhino

Hello,

when i connect the timer component to a vb component the output (A) of the component for example a randomfunction in the vb produces a new number and forgets the previous. how can i store the output and create a list, so that when i activate the timer, i get one more item of a whole list?

 

i tried that

 

dim S as a new list(of integer)

Dim r as new random

Dim U as new integer

U = r.next(100)

S.add(U)

A = S

 

but it didnt work

Views: 400

Replies to This Discussion

Take the first line of your code and put it into the section labeled " '<Custom additional code> ". Also be sure that you remove the word "a" - it's just "dim S as new list(of integer)"

You will probably also want to incorporate some way to reset the whole list and start anew. 

andrew thank you very much :) have you got any idea of how i could reset the list?

thank you

add an additional boolean input to reset - if it's true, call S.Clear().

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