Illustrator (Desktop) SDK/Scripting Issues
66 results found
-
[Typo] Document.rearrangeArtboards() of Illustrator JavaScript Reference.pdf
There is a typo in rearrangeArtboards in Illustrator JavaScript Scripting Reference.pdf. It cannot execute as per the document. Please correct it.
I have checked and it was wrong from CS5 to current version (2022 v2 - Feb 2022).
Expected Name:
rearrangeArtboards
Actual Name:
rearrangeArboards ("t" is missing from Artboards)
8 votes -
[Typo] app.tracingPresetList of Illustrator JavaScript Reference.pdf
There is a typo in app.tracingPresetList in Illustrator JavaScript Scripting Reference.pdf. The wrong property name is listed and developers and users cannot get tracingPreset. It would be helpful if it could be corrected.
According to my research, this is wrong from CS2 version to the current (2024 v1).
Expected Name:
app.tracingPresetsList (add "s" to Preset -> Presets)
Actual Name:
app.tracingPresetList ("s" is missing from Presets)
7 votes -
Broken embedICCProfile in export
For TIFF, PSD exports, there are new ExportOptionsPhotoshop() and new ExportOptionsTIFF() in the ExtendScript object model, and a Boolean attribute embedICCProfile that embeds a color profile in exports. But if we set it to true, the profile still won't be embedded.
I've explored versions of Adobe Illustrator. Illustrator CS6 - embedICCProfile property worked, but in the next version of CC (v17) embedICCProfile was broken and in the next versions it didn't change, it's been ten years!
How to test:
1) Rename exportTif.txt to exportTif.jsx and run it. The script will export the first artboard of the document in TIFF to…7 votes -
Activating artboard with a script does not update the Artboards panel
If you click inside of an artboard with a mouse, it gets the 'active' flag and becomes selected in Artboards panel as well. So if you press Shift+O to pick Artboard Tool, you see its name and dimensions.
However, if you use method setActiveArtboardIndex() — the artboard still gets the active black border, but the panel stays unrefreshed, and if you pick the tool you get the information about a different artboard.7 votes -
When getting ink.name, encoding gets broken for non-Latin languages: Chinese, Japanese, Russian, etc.
A script cannot support Chinese, Japanese and other languages when getting ink.name, and it displays garbled characters.
var doc = app.activeDocument;
var inkList = doc.inkList;
var inkUsage = [];for (var i = 0; i < inkList.length; i++) {
var ink = inkList[i];
var inkName = ink.name;
inkUsage.push(inkName);
}alert(inkUsage.join("\n"));
$.write(inkUsage.join("\n"));This test script above gives a result like in the screenshot attached.
Problem found by Aprking
Original discussion:
https://community.adobe.com/t5/illustrator-discussions/how-to-make-the-script-support-chinese-japanese-and-other-languages-when-getting-ink-name/m-p/142477916 votes -
Control the angle, length of gradients and other
ExtendScript does not allow you to control the length, angle, or other parameters of gradients. These are all read-only attributes. Script authors can only work with color stops.
For example, to rotate a gradient, we have to use the rotate() method, which has another problem. The angle of such a gradient is not copied to another object with the Eyedropper Tool: https://medium.com/@aiscripts/gradient-rotation-bug-24d7a6f6038f
The fillColor assignment commands (selection[1].fillColor = selection[0].fillColor) carry over the base gradient, losing other properties. This reduces the ability to automate gradients via ExtendScript.
Also ignores other Uservoices:
1) https://illustrator.uservoice.com/forums/908050-illustrator-desktop-sdk-scripting-issues/suggestions/44461230-adjusting-one-gradient-causes-changes-to-unrelated
2) https://illustrator.uservoice.com/forums/908050-illustrator-desktop-sdk-scripting-issues/suggestions/40296880-erroneous-fillcolor-type-one-shapes-with-freeform
3) https://illustrator.uservoice.com/forums/333657-illustrator-desktop-feature-requests/suggestions/38435974-gradient-swatch-includes-angle-and-position-pleas6 votes -
app.selectTool('Adobe Intertwine Zone Marker Tool') does not work
When I run the following script, the Adobe Intertwine Zone Marker Tool starts up and I can select the area where I want to change the overlap like the lasso tool. However, nothing happens after the selection.
app.selectTool('Adobe Intertwine Zone Marker Tool')
Expected Result
The overlap of the selected area is changed.
Actual Result
The line will remain as if it was drawn with the lasso tool. The overlap is not changed.
Enviroment
- macOS 11.7
- Illustrator 27.1.1
6 votesAn intended way of picking up the hidden Zone Marker tool via a script is to enter the Intertwine mode using these commands:
app.executeMenuCommand('Partial Rearrange Make') — when an intertwine object is not created yet, and
app.executeMenuCommand('Partial Rearrange Edit') — when the object already exists, as per comments by the OP.
-
Wrong short-discription in omv.xml
macOS10.14.7 / IllustratorCC 26.3.1
In the following omv file, the shortdesc(short description) of each property of the "TextAntialias" class in lines 833 to 865 is identical to the one for the previous "TextType" class.
(以下のomvファイル、833行目〜865行目の「TextAntialias」クラスの各プロパティのショートディスクリプションが一つ前のTextTypeのものと同一です。)/Library/Application Support/Adobe/Scripting Dictionaries CC/Illustrator 2022/omv.xml
...
<classdef name="TextAntialias" enumeration="true">
<shortdesc>The type of text antialiasing.</shortdesc>
<elements type="class">
<property name="NONE" rwaccess="readonly">
<shortdesc>Text from a point.</shortdesc>
<datatype>
<type>int</type>
<value>1</value>
</datatype>
</property>
<property name="SHARP" rwaccess="readonly">
<shortdesc>Text within an area.</shortdesc>
<datatype>
<type>int</type>
<value>2</value>
</datatype>
</property>
<property name="CRISP" rwaccess="readonly">
<shortdesc>Text on a path.</shortdesc>
<datatype>
<type>int</type>
<value>3</value>
</datatype>
</property>
<property name="STRONG" rwaccess="readonly">
<shortdesc>Text on a path.</shortdesc>
<datatype>
<type>int</type>
<value>4</value>
</datatype>
</property>
</elements>…5 votes -
firstLineIndent can’t be set to zero
Create a text object, type some text, keep it selected and run the script:
activeDocument.textFrames[0].paragraphs[0].paragraphAttributes.firstLineIndent = 20;
alert(activeDocument.textFrames[0].paragraphs[0].paragraphAttributes.firstLineIndent);activeDocument.textFrames[0].paragraphs[0].paragraphAttributes.firstLineIndent = 0;
alert(activeDocument.textFrames[0].paragraphs[0].paragraphAttributes.firstLineIndent);You have two alerts saying 20, while the second one should show and actually set the first line indent value to 0 — and it does not.
5 votes -
access opacity of TextRange
There is no way to access the opacity of a textRange. This TextFrame has 100% opacity, but it contains two textRanges, one of which is at 50% opacity. I don't believe that there is a way to make everything 100% opaque from javascript.
5 votes -
Scripting Bug: importFile() no longer works in CC2018
importFile() worked fine in CC2017, now in CC2018 it throws an "Illegal Argument" error.
here's a small JavaScript to test. Open any document or create a blank file before running the script
var f = File('c:/temp/Example File.pdf'); // to test, add a path to a valid file in your system
var idoc = app.activeDocument; // have any document open
idoc.importFile(f, false);
5 votes -
Variable font support in scripts
There doesn't seem to be any way to use variable fonts in scripts. There is an undocumented property TextFont.axisVector, but it is read-only. So there is no way to adjust the axes of a variable font via script, even though Illustrator has supported variable fonts for many years now.
Relevant thread:
https://community.adobe.com/t5/illustrator-discussions/scripting-variable-fonts-in-illustrator/td-p/98345144 votes -
Join command is unavailable when run from an action via a script
We have an action that works, when launched form the Actions panel.
Operations are simple:
1. Copy
2. Deselect All
3. Paste in Front
4. Join
5. Join
It is designed to create a new closed shape from two segments from different shapes.However, when we call this exact action from a script with a app.doScript, it doesn’t work, an error message 'The object "Join" is not currently available' is displayed.
Please see the video.
4 votes -
an Illustrator error occurred: 1346458189 ('PARM')
I get this error too often on an irregular basis.
Do something.
At the very least, please return the correct cause of the error as to what caused the error.createOutline (),
Move () for each objectEtc., this error of the title is occurring too much during loop processing with for or while.
I've come to hate Illustrator anymore.
Please give the correct information to this error.
I want to deal with it.This error has been the same since at least Illustrator CC 2014.
I thought that the frequency of errors occurred in Illustrator CC 2017 was considerably…4 votes -
Erroneous fillColor type one shapes with Freeform Gradients
Trying to get the fillColor properties of shapes that feature Freeform Gradients
- Using app.activeDocument.selection[0].fillColor
- Returns a [GrayColor] instead of what we would expect to be a [GradientColor] of GradientType.FREEFORM
4 votes -
import graphic styles from file or library
with javascript, there is no way to import graphic styles from libraries or files. there is a way to open ai documents as graphic style libraries but then there is no script access to that library.
currently what i have to do is have an ai file with objects with graphic styles assign to them. with my script i open that file, select the objects, copy them, close the file, switch documents, paste objects, delete objects.
this can take a while and it is a very ugly solution. ideally there should be something as simple as importGraphicStylesFromFile(File)
or at least …
4 votes -
Bug: JavaScript unary operators "+" and "-" do not function as documented for UnitValue objects
According to the Illustrator ExtendScript documentation, applying the unary operators "+" or "-" to a UnitValue object should respectively produce the numeric value or the negated numeric value of the UnitValue. However, they instead respectively produce the UnitValue unmodified or the UnitValue with its value negated.
Either the documentation or the behaviour should be updated to reflect the other.
I observed this behaviour in Illustrator 28.5 on Mac OS Sonoma.
The behaviour may be quickly tested with the following script:
var uv = new UnitValue(2, "px");
alert(
"Results:" +
"\nUnitValue unmodified: \"" + uv + "\" (" + (typeof uv)…3 votes -
Vertically alignChildren in ScriptUI does not align properly
In the ScriptUI documentation, there is an alignChildren attribute: "Tells the layout manager how to align children of this container that are not of the same size in a column or row". The issue of vertical alignment of UI objects in the scripts dialog box persists from version to version of Illustrator.
As we can see in the image, only the top alignment seems to be correct. The center alignment is shifted up, and the bottom alignment does not reach the bottom. At the same time, native UI dialogs contain the correct alignment. Thus script interfaces always look less professional.
…
3 votes -
Please update "Planet X" in backend to "Live Paint"
Actions read from API are named "Planet X".
In AI menu, they are "Live Paint"Additionally, there is one typo: "Marge Planet X" = "Merge Live Paint"
When Loupedeck reads the actions from API, they appear with outdated names in Loupedeck UI.
3 votes -
Update the VSCode ExtendScript Debugger
This is an essential tool.
Too many issues to mention here - and that's just on a PC. It doesn't work at all on ARMx64
The community needs this kept up to date!
3 votes
- Don't see your idea?