Reflect steps in a loop - Update Solution

Hi All.
I have been trying to find something related with my issue but I don't seem to get any light on this thing.

I am looking for a way to make a scripting component not only output the final state of the script but every intermediate state. For instance:

x as double = 1.0
y as double = 2.0
z as double = 3.0
pt as point

for i as integer = 0 to 100

pt = (i*x,i*y,i*z)

next

A = pt

If I do this, my vb component only outputs a point in (100,200,300)

How should I proceed, what should I add to my definition, if I wanted my component to show the point evolving trough i=0, i=1, i=2 ....i=100.

I have searched regarding "continuous redrawing, timer, solution update.." but I couldn't find anything dealing exactly with this.

Thank you very much!
  • up

    David Rutten

    Hi Roberto,

    don't worry, it's nothing as complicated as timers or updates. All you need to do is store all your points as you make them, rather than overwriting the same pt value over and over again:

    Dim x As Double = 1.0
    Dim y As Double = 2.0
    Dim z As Double = 3.0
    Dim pts as New List(Of On3dPoint)

    For i As Integer = 0 to 100
    pts.Add(New On3dPoint(i*x,i*y,i*z))
    Next

    A = pts

    --
    David Rutten
    david@mcneel.com
    Poprad, Slovakia
    5