Hi list - I’m writing a command in jsfl to change the stroke-width and colour of a batch of library items based on currently selected objects (code below - the stage instances have the same name as the library objects). It works perfectly, EXCEPT it is ignoring the line doc.setStrokeScaleType(‘none’).
I don’t want the stroke of the library objects to scale - this seems to be the only way to do this on library items - any ideas why this isn’t working?
var doc = fl.getDocumentDOM();
var strokeSize=parseFloat(prompt(“Enter Stroke-width [pixels]”));
//build an array of names of selected objects
var myArray = new Array();
for(var i=0; i<doc.selection.length; i++){
myArray*=doc.selection*.name;
}
//run through array and edit underling library item
for (var k=0;k<myArray.length;k++) {
doc.library.editItem(myArray[k]);
doc.setStrokeSize(strokeSize);
doc.setStrokeColor(’#333333’);
doc.setStrokeScaleType(‘none’);
doc.exitEditMode();
}