Animate 2020.
document.setTaggedSwatchByName(oldSwatchName:name, newSwatch:object).
oldSwatchName:It is a string that indicates the name of the tagged swatch to update. newSwatch: new swatch Object.
Nothing.
Method;replace the tagged swatch with the given name to the given new swatch object.
The following example replace the tagged swatch with the given name "Oldswatch" to the given new swatch object swatch1.
var document = fl.getDocumentDOM();
var swatch1 = new Object();
var fill = fl.getDocumentDOM().getCustomFill();
fill.color = "#FF00FF";
fill.style = "solid";
swatch1.fill = fill;
swatch1.name = "solid_swatch";
document.setTaggedSwatchByName("Oldswatch",swatch1);