Copy link to clipboard
Copied
(my nickname is ammoniaavenue)
Hi,
I've tried to find documentation but I could not find. I want to add all groups to Asset Export panel and I want to change its names. Currently I have 50 groups and all of them have to be export seperatly. To do that I have to add them one by one to asset export because Illustrator 2017 doesn't do that. If you select all groups and drag it to panel they become one asset.
anyway, how can I add an item to asset export panel via scripting?
thank you.
Copy link to clipboard
Copied
You may have better luck posting on
Copy link to clipboard
Copied
i can't see any reference to asset export in the 2017 scripting reference. my guess is it's not accessible via extendscript.
Copy link to clipboard
Copied
Copy link to clipboard
Copied
There are no way to access asset export. However, we can export each groups to png file.
Here is a solution to export you can reference.
var options = new ExportOptionsPNG24();
options.artBoardClipping = true;
options.matte = true;
var tg = app.activeDocument.groupItems;
var tgFldr = Folder.selectDialog ("Select Export Holder");
var dstFl;
for (var i=0;i<tg.length;i++){
app.executeMenuCommand("deselectall");
tg.selected = true;
app.executeMenuCommand("Fit Artboard to selected Art");
dstFl = tgFldr.fsName + "/exportPng" + i + ".png";
$.writeln(dstFl)
app.activeDocument.exportFile (File(dstFl), ExportType.PNG24, options);
}