# Kangaroo to .ai \[VB Script\]

**URL:** <https://discourse.mcneel.com/t/kangaroo-to-ai-vb-script/137266>\
**Category:** Grasshopper\
**Tags:** windows\
**Created:** [February 1, 2022, 2:56pm UTC](https://discourse.mcneel.com/t/kangaroo-to-ai-vb-script/137266 "2022-02-01T14:56:41Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![olivaniccolo](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/olivaniccolo/32/470856_2.png) [@olivaniccolo](https://discourse.mcneel.com/u/olivaniccolo)\
**Post date:** [February 1, 2022, 2:56pm UTC](https://discourse.mcneel.com/t/kangaroo-to-ai-vb-script/137266/1 "2022-02-01T14:56:41Z")

</div>

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](https://discourse.mcneel.com/uploads/short-url/esBUERmxD90pvP8HeymbIlvtk7X.gh) (63.9 KB)

 ![1](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/d/a/7/da7d5e46ef81984be5cfe2fe180bf8ee7ea54977.png)  
 ![2](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/3/8/a/38a8f55d1745f9bb6df27ff093af99c03b27f454.png)

---

<div class="post-metadata">

**Author:** ![DanielPiker](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/danielpiker/32/666337_2.png) [@DanielPiker](https://discourse.mcneel.com/u/DanielPiker)\
**Post date:** [February 1, 2022, 3:34pm UTC](https://discourse.mcneel.com/t/kangaroo-to-ai-vb-script/137266/2 "2022-02-01T15:34:53Z")

</div>

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](https://discourse.mcneel.com/uploads/short-url/aX4LEDKa1oIpBffC5BUk6lkH0Ja.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.

---

<div class="post-metadata">

**Author:** ![olivaniccolo](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/olivaniccolo/32/470856_2.png) [@olivaniccolo](https://discourse.mcneel.com/u/olivaniccolo)\
**Post date:** [February 1, 2022, 3:58pm UTC](https://discourse.mcneel.com/t/kangaroo-to-ai-vb-script/137266/3 "2022-02-01T15:58:05Z")

</div>

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](https://discourse.mcneel.com/uploads/short-url/f7v4FryZlODmOmicOsrV9cOBCQ7.gh) (16.2 KB)

 ![3](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/1/f/7/1f75279e8b2c86f029da96dcaa7299f84c83c187.jpeg)

---

<div class="post-metadata">

**Author:** ![DanielPiker](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/danielpiker/32/666337_2.png) [@DanielPiker](https://discourse.mcneel.com/u/DanielPiker)\
**Post date:** [February 1, 2022, 4:06pm UTC](https://discourse.mcneel.com/t/kangaroo-to-ai-vb-script/137266/4 "2022-02-01T16:06:37Z")

</div>

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?
