Kangaroo to .ai [VB Script]

Hi, I’m trying to export a series of .ai frames of a kangaroo generated curve. I found a visual basic script on the old forum but it doesn’t seem to work: I connect a slider to the reset’s input of the solver (it works somewhat as a timer), and use the very same slider to feed the script’s boolean toggle (if the value is greater than 0 it feeds a ‘true’). I can’t code at all, so I was wandering if somebody could help me make this work.
Animation.gh (63.9 KB)


Hi @olivaniccolo

For rendering or outputting each frame of a Kangaroo solution with a slider, the easiest way is to use the ‘StepSolver’ component.
stepsolver.gh (9.7 KB)
When the connected slider is zero, the solver resets, then with any update of this slider (the actual value doesn’t matter) it will perform the given number of subiterations and output the result. So you can use the right-click slider animation feature of grasshopper to produce a sequence of frames.

1 Like

Thanks @DanielPiker, now I can bake the curves and export them as progressive illustrator files manually! However I would like to automate this process, so that at each slider step an .ai file is generated. I tried plugging everything back into the script but I get this error:
stepsolver 2.gh (16.2 KB)

That looks like a problem with the saving script - it looks like it is maybe quite an old script that references outdated functions. Where did it come from?