Skip to main content
Inspiring
November 1, 2018
Question

How to manipulate static symbols

  • November 1, 2018
  • 0 replies
  • 500 views

Hi,

background: I try to script some linting tools for a designer, for tasks such as making all "nearly black" art inside symbols a true black.

Until CC2017, a working way was

var newlayer = doc.layers.add(); newlayer.name = '_unique_name_';

var sym = obj.symbol;

var name = sym.name;

var newobj = doc.symbolItems.add(sym);

newobj.move(newlayer, ElementPlacement.PLACEATBEGINNING);

sym.remove();

// newlayer contains the artwork ready for inspection or manipulation, inside a group

newobj = newlayer.groupItems[0];

// rebuild symbol - creates a static symbol

doc.symbols.add(newobj, SymbolRegistrationPoint.SYMBOLTOPLEFTPOINT);

This no longer working in CC2018. For dynamic symbols only

newobj.breakLink();

will again make the artwork available in newlayer. If newobj is still a SymbolItem after that, it was using a static symbol.

Does anybody know how to get inside a static symbol?

This topic has been closed for replies.