5/31/2023 0 Comments Add an artboard in illustratorVar list = executeActionGet(r).getList(stringIDToTypeID("targetLayersIDs")) įor (var i = 0 i < unt i++) ids.push(list.getReference(i). R.putEnumerated(stringIDToTypeID("document"), stringIDToTypeID("ordinal"), stringIDToTypeID("targetEnum")) R.putProperty(stringIDToTypeID("property"), stringIDToTypeID("targetLayersIDs")) R1.putIdentifier(stringIDToTypeID("layer"), id) ĭ.putReference(stringIDToTypeID("from"), r1) ĮxecuteAction(stringIDToTypeID("make"), d, DialogModes.NO) R.putClass(stringIDToTypeID("artboardSection")) If (id) for (var i = 0 i < id.length i++) make_artboard(id ) R.putEnumerated(stringIDToTypeID("layer"), stringIDToTypeID("ordinal"), stringIDToTypeID("targetEnum")) ĭ.putReference(stringIDToTypeID("null"), r) ĮxecuteAction(stringIDToTypeID("selectAllLayers"), d, DialogModes.NO) I have a script, but it only creates an artboard for one layer and these artboards in one place. Setup your project size and measurement units from the New Document. Or, to start a new project from the top menu, click File > New. From the launch window click the Create New button on the left side. Replace recorded artboard width with canvas widthĭescriptor2.putDouble( s2t( "right" ), abWidth ) ĭescriptor.putObject( s2t( "artboardRect" ), s2t( "classFloatRect" ), descriptor2 ) ĮxecuteAction( s2t( "make" ), descriptor, DialogModes.NO ) To create a new Artboard (new project): Open Illustrator. Replace recorded artboard height for canvas heightĭescriptor2.putDouble( s2t( "bottom" ), abHeight ) descriptor.putInteger( s2t( "layerSectionStart" ), 5 ) Reference.putClass( s2t( "artboardSection" )) ĭescriptor.putReference( c2t( "null" ), reference ) Var descriptor2 = new ActionDescriptor() ScriptingListener/AM code tidied up via the Clean SL script New artboard height converted to a float New artboard width converted to a float Var savedRuler = Īpp.lerUnits = Units.PIXELS Create New Artboard at Canvas Dimensions Assuming that the goal is to create a new artboard at the existing document canvas size, rather than an iPhone size or some other preset or custom value.
0 Comments
Leave a Reply. |