Copy link to clipboard
Copied
Since creating placed artwork from an external AI file has proved problematic, I decided to try using Symbols.
Does anyone know how to get symbols into Illustrator's default list, so that they are available to any document? I created my own symbol library, which I can load using the palette, but I can't seem to find a file that I can add my symbols so that they always just appear in the default list.
The "Unlisted" symbols feature also looks promising, since I don't really need the user to see these at all.
I'm not really sure how to go about this. Maybe someone has some experience adding and using custom symbols?
AIDocumentHandle handle = 0;
sPathStyle->ImportStyles(path, &handle);
ai::int32 count = 0;
sSymbol->CountSymbolPatternsFromDocument(&count, handle);
for (ai::int32 i = 0; i < count; i++) {
AIPatternHandle symbol = 0;
sSymbol->GetNthSymbolPatternFromDocument(i, &symbol, handle);
AIPatternHandle newStyle = 0;
sSymbol->RetargetForCurrentDocument(symbol, &newStyle);
}
Copy link to clipboard
Copied
AIDocumentHandle handle = 0;
sPathStyle->ImportStyles(path, &handle);
ai::int32 count = 0;
sSymbol->CountSymbolPatternsFromDocument(&count, handle);
for (ai::int32 i = 0; i < count; i++) {
AIPatternHandle symbol = 0;
sSymbol->GetNthSymbolPatternFromDocument(i, &symbol, handle);
AIPatternHandle newStyle = 0;
sSymbol->RetargetForCurrentDocument(symbol, &newStyle);
}
Copy link to clipboard
Copied
Looks good. That's almost exactly what I came up with. Except I forgot about the "FromDocument" functions so I was flicking back and forth between them with Activate(..). And I open my source document with DocumentList->Open(...). Is there a reason you choose to create a new document with ImportStyles instead?
Copy link to clipboard
Copied
Weird. It looks like ImportStyles opens the document "silently" so it doesn't show in recent documents or flicker the display as it opens and closes. Very interesting.
Copy link to clipboard
Copied
Yeah, I was going to write and tell you that That's not the only 'silent' document function. When you place art, at least for rasters, it also semi-silently does the same thing. I say 'semi-silently' because you get document opened notifiers and I had re-jig my code to ignore them if they didn't exist in the document list. That was a while ago though, so they may have fixed that; it felt like a bug.
Copy link to clipboard
Copied
Hi
This looks like it is a script, but how exactly use this, trying to use in Mac Illustrator version 2019
Copy link to clipboard
Copied
Old thread, but this is something I'm trying to do. I take it this uses Scriptographer. Is it compatible with AI CC 2015 and how do I run it? Do I need to install Scriptographer or is it simply a .JSX? Sorry, I'm clueless.
Copy link to clipboard
Copied
Scriptographer is a plugin. It's compatible to versions up to CS5.
Into Scriptographer you can then plug scripts. But they won't run without Scriptographer as their base.
Copy link to clipboard
Copied
So, for all practical purposes it is a "dead" program. I love CS5 but most customers/businesses do not even have it anymore. Thank you for clarifying.