perhaps i'm not clear, but this script is about the same i explained first.
however this DOES NOT make a copy, it convert a link to embed. and this is a buggy feature of illustrator, because when it does so, it will convert anything to graph & outlines.
so a text will become a outline (Loosing text editability), and svg interactivity is lost.
this is how people where working with symbols, before cc 2015 with librairies.
so what i need is something to :
select a linked object (in fact all same reference object), find it into the libraries (easy to do, see first script), and replace it by the "place a COPY". this now is a perfect file, all copy are updated correctly and in place.
fred
I don't get text becoming outlined,
but I do get a dumb amount of clipping paths.
I hate the over use of unnecessary clipping paths.
I'm still not sure what you really want to do.
But this may be getting closer...
start by dragging your desired library Items to your document.
this places them all as links.
once you are happy, run this script.
it will replace each linked library item with a copy.
if ( app.documents.length > 0 ) {
var sourceDoc = app.activeDocument, artItem, myAsset, pos = [];
sourceDoc.selection = null;
for (var i = sourceDoc.placedItems.length-1; i > -1; i-- ) {
artItem = sourceDoc.placedItems;
pos = [artItem.left,artItem.top];
myAsset = File(artItem.file.fsName);
app.openCloudLibraryAssetForEditing(myAsset,myAsset);
app.executeMenuCommand ('selectall');
app.executeMenuCommand ('copy');
app.activeDocument.close(SaveOptions.DONOTSAVECHANGES);
sourceDoc.activate();
app.executeMenuCommand ('paste');
app.executeMenuCommand ('group');
sourceDoc.selection[0].position = pos;
artItem.remove();
}
}