Copy link to clipboard
Copied
I'm working on a file that has a large number of icons on it but would like to convert those icons into symbols to create a symbol library. However, when selecting multiple icons to create new symbols, it just creates one grouped symbol.
Is there a way to select multiple objects and have them convert into individual symbols?
Copy link to clipboard
Copied
check the script on this thread, hope it helps
Re: How to make Static Symbols as your default in Illustrator.
Copy link to clipboard
Copied
Hi Carlos,
I just looked at your script, and it’s amazing — but appears to change the default from Dynamic to Static, while Dany’s issue seems to be that she/he wants to select multiple icons and make them into individual symbols.
I am going to assume each icon is a group of objects, although we didn’t hear that. We also don’t know if they are on one artboard or individual artboards.
~ Jane
Copy link to clipboard
Copied
Hi Jane,
Yes, each icon is a group of objects and, they are all currently set in one artboard.
Thanks
Copy link to clipboard
Copied
Moving the discussion to Illustrator Scripting community.
Copy link to clipboard
Copied
Hi Jane, the script just creates symbols out of whatever is selected. It just happens to make them static by default when they're created via scripting as opposed to making them dynamic when we create them by hand.
Copy link to clipboard
Copied
CarlosCanto wrote
Thank you for the full explanation, Carlos — as well as for all of the scripts that you have written!
Jane
Copy link to clipboard
Copied
my pleasure Jane
Copy link to clipboard
Copied
I must have been in my hibernation phase when you posted this script, Carlos. This'll be very useful. Thank you!
Peter
Copy link to clipboard
Copied
enjoy, thanks Peter!
Copy link to clipboard
Copied
Hello Carlos!
I was searching for such a decision for a long time and finally found this thread. Unfortunately the link that you gave is inactive now... Is it possible to reload the link to the script?
Thanks in advance
Anastasia
Copy link to clipboard
Copied
Hi Anastasia, yeah old threads didn't make it into the new forum format. But I have the original script. I'll post it in a separate replay (using the Blue "Reply" button at top of this page) to prevent my reply getting buried in this thread.
Copy link to clipboard
Copied
That's exactly what I was looking for! 😉
Thanks a lot, Carlos!!!
Copy link to clipboard
Copied
Hi Dany. Just drag the icons to the Assets export panel, define the export settings and click the Export button.
Copy link to clipboard
Copied
Hi Marliton,
That would just create individual files. I'm trying to convert the icons into symbols within the symbols panel without having to do it 1-by-1
Copy link to clipboard
Copied
Hi Dany, did you try using the script?
Copy link to clipboard
Copied
Select all identical icons, run Carlos' excellent script then "replace" all selected symbol instances with ONE of the identical Symbols. The last step is to "Delete unused Symbols".
Copy link to clipboard
Copied
My bad. Sorry. I read wrong.
Copy link to clipboard
Copied
Here's the origial script posted in the missing link above. I hope this is the one.
// script.name = addStaticSymbols.jsx;
// script description = create Static Symbols out of selected Objects, Version 2 replaces selection with newly created symbol
// script.requirements = open document with one or more selected objects
// script.parent = CarlosCanto // 11/24/2017; v2 05/10/2018
function main() {
try {var idoc = app.activeDocument;}
catch (e) {alert ('Open a document and try again'); return };
var sel = idoc.selection, a, newSymbol, instance;
for (a=sel.length-1; a>=0; a--) {
newSymbol = idoc.symbols.add(sel[a], SymbolRegistrationPoint.SYMBOLCENTERPOINT);
try {
newSymbol.name = sel[a].name;
}
catch (e) {}
instance = idoc.symbolItems.add(newSymbol);
instance.position = sel[a].position;
sel[a].remove();
}
}
main();
Copy link to clipboard
Copied
Hi Carlos.
I realize it has been a while since this thread has been active, but I hope I can catch your support.
When I try to run your script, I get an "Expected Statement" error. I tried looking it up, and it says it most likely is the file I am working from causing it. But I get this error on anything I try to run it on.
Granted, I am not an expert at scripting, but I do believe I managed to copy paste your file, save it as .vbs, and I can click it in Ai, but it won't work.
Can you help, and apologies if this is something basic I am missing...
Copy link to clipboard
Copied
It's Javascript. Save it as .jsx
Copy link to clipboard
Copied
Hi Carlos,
Thanks so much for creating this. I'm working on a Mac and when I place this in script editor I get an error: Error -2700: Script error.
Hope you can help me out, I'm trying to create a symbol libaray for multiple items without dragging them in the libaray one by one.
Thanks in advance!!
Copy link to clipboard
Copied
Hi Carlos,
Thanks so much for creating this. I'm working on a Mac and when I place this in script editor I get an error: Error -2700: Script error.
Hope you can help me out, I'm trying to create a symbol libaray for multiple items without dragging them in the libaray one by one.
Thanks in advance!
Copy link to clipboard
Copied
Hello Gaia, paste the text in a text editor (not script editor), then save it as Plain Text (not Rich Text). When saving give it a *.jsx extension
Copy link to clipboard
Copied
Works like charm!!!