Hi all,
I'm quite new to ExtendScript. I'm trying to see if I can automate the placement of svg files into Illustrator from JavaScript
How do I change the anchor point of insertion of an svg file? Right now, the insertion is always w.r.t TOP LEFT as anchor, but I want to change it to CENTER. I'm trying to use the transform function but it's not working. Perhaps the syntax is wrong or I should be using another function?
var doc = app.activeDocument.layers["Icons"];
var svgFile = File('C:/Users/johns/Desktop/ArtPainting_f5c43e74-e16a-4bfc-af6a-145fbd21d5ea.svg' );
artboard=doc.groupItems.createFromFile(svgFile);
artboard.transform(false,false,false,false,undefined,Transformation.CENTER);
artboard.position=[58.98-15.4,-38.65];
Appreciate the help.
Thanks!