Easy Processing > Illustrator Export (bonus SVG export)

After a long time playing with ideas for an easy Processing to Illustrator tool that would allow fancy coding to be piped directly into Illustrator for further layout (and was vector-based the whole way through – no terrible rasterization allowed), I now have a really easy solution that doesn’t involve any fancy code, external libraries, or command-line nonsense.  The process:

1. Write your code as usual, but add PDF export


2. Run once and use File > Place… to insert the PDF into your AI document (do not simply open the document, as changes will not be reflected) — NOTE: be sure “Link” is clicked when placing


3. The resulting PDF, placed into the document as a single unit


4. Make changes in Processing and re-save the pdf – here we reduce the number of lines from 1,000 to 10


5. Back in AI, you will be prompted to update the pdf – easy!  No need to ask it, simply moving between programs updates your work


6. Awesome, done.

A dead end for this process was SVG export from Processing, which is not super easy (surprisingly).  Here’s my hack that uses Inkscape’s command line tools: