Copy link to clipboard
Copied
Is there a simple way using the SDK in c++ to find other symbol libraries and access symbols in them? That is, select a symbol library from the Symbol panel's flyout menu, and access symbols there.
GetNthSymbolPattern only works for the current document, and GetNthSymbolPatternFromDocument won't work because the external symbol library's document is not actually open.
Any suggestions would be much appreciated.
The missing piece you're looking for is AIPathStyle::ImportStyles(). That lets you specify a path to an AI document and gives you an AIDocumentHandle that you can use with the GetNthSymbolPatternFromDocument() function.
Copy link to clipboard
Copied
The missing piece you're looking for is AIPathStyle::ImportStyles(). That lets you specify a path to an AI document and gives you an AIDocumentHandle that you can use with the GetNthSymbolPatternFromDocument() function.
Copy link to clipboard
Copied
Thanks, Andrew, it works perfectly! I wouldn't have expected the answer to be in path styles. At first I wondered if it would open the symbols as another document, but it didn't. I also expected the solution would involve checking each open symbol panel, but that's OK, in this case I need a specific document's symbols.
It would be even better if the plugin could now open that document's symbols library in a panel.
-- Many thanks!