Skip to main content
Inspiring
April 13, 2012
Answered

looping through collection of symbols and populating a drop down on a form EXTENDSCRIPT

  • April 13, 2012
  • 1 reply
  • 3273 views

Hello everyone-

I got a question.  Would it be possible to run a script that would loop through a collection of symbols in a defined library and populate a drop down with the available symbols. My goal is to be able to open Illustrator, and when I run the script the dropdown is populated with all available symbols(text is fine) in a defined library that I can then select and place on the artboard. Any help would be appreciated.

thanks in advance!

This topic has been closed for replies.
Correct answer Muppet Mark

ok, thanks, I think I'm starting to follow you.

So if I was to create a template file, place all of the symbols that I would need in the document's symbol library, could I populate the drop down with those? From your left example above, could the names of the symbols be populated in the drop down list as those are accessible in script and be chosen and drawn on the artboard on a button click?

If that's the case, couldn't I use wild cards and if statements to feel each separate dialog?

For example-

One dropdown would be linked to symbols whose names began with "Zip*" and the second would be linked to symbols whose names began with "POLY*". These wouldn't be in separate libraries but they would be in the one accessible throught script in the active document.

Is this doable, if not I'll give up and call it a day!


An AI template file containing all your symbols is fine… That will just be doc.symbols how you chop up that array into sub arrays would be down to you… I don't see how this is going to be any improvement over the symbol scrolling at the bottom of the library palette… See the back & forth arrows in the snapshot… I can jump very quickly between sets of symbols here…

1 reply

Inspiring
April 13, 2012

Im ok with lines 0 && 4 but there's an encoding issue with all in between…

Inspiring
April 13, 2012

So it's not possible?  What do you mean by encoding issue?

Inspiring
April 13, 2012

Don't mark that as helpful is wasn't in the slightest… I was joking with you… What I meant was I can understand…

Hello everyone and thanks in advance!

what I don't get/follow is your description of the question… Where is defined library of symbols are the available symbols in the doc… Just trying to create the mental picture of what you are tring to acheive?