Illustrator (Desktop) SDK/Scripting Issues
67 results found
-
52 votes
-
Please add feature for to make object as key object via script to perform align operations.
Hi, I am a plugin developer, and there is a lot of features we are missing in Illustrator scripting that can be done manually in Illustrator. This is the one feature. Please add this feature so that we have some method or property to make the object as a key object to perform "Align to Key Object" operation via script.
43 votes -
Allow scripts (AppleScript, Javascript) to retrieve a full list of all selected layers
Currently, you can ask Illustrator what layer is selected, but if a user has more than one layer selected, it won't give a list or array of all selected layers. It will still just give you one layer. So many scripts I write have to do with changing properties of multiple layers like batch renaming or batch recolouring. The workaround is to ask the end user to lock all layers they don't want to be affected. It would be much more natural for them to just select the layers they want to be affected.
27 votes -
Edit Appearances with Scripting
Currently it appears only 1 appearance fill is available via scripting, and Illustrator spits out the value of whichever one is selected. What I'd like to be able to do, is loop through the appearances of layers for example, record those attributes(including layer opacity and blending modes) and apply those to fills within a single shape. As there are many more stacked attributes within appearances, it may not be this simple, but it'd be much appreciated.
24 votes -
Accessing Opacity Mask is impossible with scripting
There is no way to work with the transparency mask in the Script SDK. This is the least of the problems. But when creating scripts to modify objects with masks, developers expect masks to be modified along with the parent object. After all, we see the "Linked to Art" icon in the Transparency panel.
But what we have all these years as script developers: resize(), position, translate() modify the object, and its mask remains as it was.
I've counted about 10 of my own scripts that use similar commands. I also have a large collection of other developers' scripts, where…
17 votes -
Constrain Proportions button toggle
app.preferences.setBooleanPreference('linkTransform',1);
makes the Constrain Width and Height Proportions button to toggle... but only internally, the button does not change.16 votes -
ExportOptionsJPEG both resolution and quality
We can export a JPEG using ExportOptionsJPEG() — but it allows to set only quality, not a resolution.
We can use ImageCaptureOptions() instead to set a resolution — but it won’t allow to set a quality, because seems to be designed for PNG (and substituting a format to JPG gives questionable results).
We need to be able to export JPEG images, controlling both quality and resolution, without using app.doScript() trick — it fails on Cyrillic folder names.
16 votes -
Create and edit Graphic Styles with scripts
Hello,
I develop a plugin where I need to create/update/modify graphic style and/or Aspect for graphic item.
I try many solutions, search on the web but for the moment it's not possible.Could you please add support for creating/editing/deleting graphic style and aspect ?
It's very important for me ! And I think many developpers can be interesting with this features.Thanks a lot !
Loïc16 votes -
Document.save() for eps/svg/pdf documents changes them to ai files
en_US
Document.save() is a method to save over a document. In keyboard shortcut, it is equivalent to command+S.
However, when ExtendScript's save() is executed on a document that preserves Illustrator editing capabilities such as eps/svg/pdf, it will be saved as an ai document instead of being overwritten as its original format.
For example, when save() is executed for the document
1.eps
, the file1.ai
will be created in the folder where the eps is placed. If the file1.ai
already exists, it will be overwritten with the contents of1.eps
and the original1.ai
will be lost.Environment
- macOS…
15 votes -
Unexpected reset of selected swatches
app.activeDocument.swatches.getSelected() gets selected swatches in the document. If you select one path in a document and apply any selected color to it, the swatches will remain selected. But if many paths are selected, applying a swatch to any path resets the selected swatches.
The user has to manually select the swatches again each time he runs the scripts.
15 votes -
Iterating through large collections is very slow (non linear).
Whenever I have a need to iterate through a large collection (such as pageItems) the iteration is very very slow, and the larger the collection is the more slower it gets. I would expect this to be a linear behavior, but it's not. If a collection's size doubles, it takes more than double the time to iterate through it.
14 votes -
Access all variables necessary for each item's appearance
Lots of obvious variables are missing from each type of item. I've not tested exhaustively so I've no doubt there'll be other examples, but here are a few I've recently run up against;
— fillColor and strokeColor are entirely missing from both text and group items.
— where a path has multiple fills or strokes, you can't select which one is referenced, and the rest are inaccessible.
— arrow heads
— effects (eg. I'd like to be able to access properties of a 3D effect)
— graphic styles (reference, rename, create, remove, edit)14 votes -
Illustrator 2022 (26.5.0) listStyle scripting issues
Starting with Illustrator 2022 (26.4.1), the ability to create bulleted and numbered lists has been implemented. Text to which lists are applied can be obtained in ExtendScript or AppleScript by using the listStyle property.
However, normal text that is not bulleted and numbered lists (hereinafter called "normal text") has no listStyle assigned to it, and referencing it causes an error. The following problem occurs.
Issue 1: ExtendScript and AppleScript cannot directly change lists to normal text
Expected state
For example, the following script (ExtendScript) can change a paragraph to normal text.
…var doc = app.documents[0] ; var targetParagraph = doc.selection[0].paragraphs[0]
11 votes -
[Typo] ExportOptionsTIFF.IZWCompression of Illustrator JavaScript Reference.pdf
There is a typo in ExportOptionsTIFF in Illustrator JavaScript Scripting Reference.pdf, which fails to specify whether or not LZW compression is used. Please correct it.
I have checked and it was wrong from the CS6 version.
Expected Name: lZWCompression (begins with a lowercase L)
Actual Name: IZWCompression (begins with an uppercase i)The function name in the example is also wrong. exportFileToTIFF should be correct.
…Exporting to TIFF format // Exports current document to dest as a TIFF file with specified // options, dest contains the full path including the file name function exportFileToPSD (dest) { // <-- exportFileToTIFF if
11 votes -
selection geometricBounds and true geometricBounds for clipped objects
Allow for access to the selection geometricBounds as a whole. Also bounds for the clipped area only (ignore hidden areas).
In Illustrator, the Transform window displays the position, width and height for all objects selected and it does not display clipped areas. when you size an object by entering a dimension, you don't have to worry about clipped areas. in scripting you do.
The geometricBounds, visibleBounds, controlBounds, height and width properties give you the size of clipped objects. for a couple of items you can check if each is clipped and if it is, you can then retrieve the first…
11 votes -
Bring back the old scripting forums
Bring back the old scripting forums, the new "Community" forums are a joke. It's totally unintuitive and impossible to find anything scripting related as its all thrown in with general user stuff. Looks like all the money has been spent on "Badges" when all we want is easy to find help. Looks like all the historical data has mostly been removed as well so that's bad if you are looking for something someone may have answered in the past. Big step backwards...
11 votes -
Remove Security from Scripting Guides
Why are Scripting Guides/References password protected now?
many times we need to copy/paste sample scripts to help new users in the forums.
Please remove protection.
thanks
Carlos11 votes -
Drag-and-drop bug running scripts containing app.doScript()
Watch the "drag-and-drop-bug.mp4" video, which demonstrates a specific but with the Adobe Illustrator's JS engine handling scripts which are dragged to different areas of the screen in different ways.
In most cases, a drag-and-dropped script will work as intended. But for 10 years in CS6-CC 2023 versions there is a limited bug handling the script if dragged to the “wrong” area of the program window.
If the script contains an action and a user drags it onto the document window, it may not work correctly. If the script selects objects one by one and applies an action to them, it…
10 votes -
Isolate/Unisolate commands
Commands:
//menu Other Object\Isolate Selected Object
app.executeMenuCommand('enterFocus');//menu Other Object\Exit Isolation Mode
app.executeMenuCommand('exitFocus');Return error:
an Illustrator error occurred: 1346458189 ('PARM').This applies not only to isolation, but also to some other commands.
9 votes -
addDocumentNoUI methods argument not selectable.
1.Your version of Adobe Illustrator
Illustrator ver.21 or later.2.The steps you were taking when you experienced the issues
When we run addDocumentNoUI method, we can set startupPreset.
However, It always sets "Web" preset.3.Your expected result
When we select "Art & Illustration" document open with appropriate preset.4.Your actual result
All the time we got a document made with "Web" preset.Here is a sample code of NoUI scripting.
var dc = app.documents.addDocumentNoUI("Art & Illustration");
//add some objects
dc.saveNoUI(File("~/Desktop/testNoUI.ai"));
dc.closeNoUI();After run it and open in Illustrator, we will find it used Web preset.
We want to choose appropriate…9 votesvar dc = app.documents.addDocumentWithDialogOption(“Art & Illustration”, false);
//add some objects
dc.saveAs(File(”~/Desktop/testNoUI.ai“));
dc.close(SaveOptions.DONOTSAVECHANGES);Above script works for creating, saving and close the document without UI. The document preset is localized, if you are using locale other than english, you should pass the localized name of preset to addDocumentWithDialogOption method.
- Don't see your idea?