Illustrator (Desktop) SDK/Scripting Issues
-
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.
6 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.
6 votes -
CEP: Unique identifier for items and layers Please provide unique identifiers for all page items and layers via script.
Right now it is not possible to save IDs of page items/layers in a variable or array and retrieve them at a later point in the script.
At first I could not believe it that there are no IDs. This is total basic and should be a no-brainer and default.
Thanks!P.S. Current workaround: set custom tag on items. This works only as long as the user is not duplicating an items. Than you have two items with the same tag and it is not unique anymore.
Workaround…6 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
5 votes -
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 -
Concerns about the future of CEP and UXP I've been reading through the new information about UXP and the announcement that it will be replacing CEP.
If this happens it will likely mean the end of our current CEP extension, since the support provided in UXP does not cover our use case. To be specific we have problems with the following areas:
1) Most critical UXP is "not a browser" and as such will only support a subset of HTML. Our extension relies on being able to run another web application within the browser control supplied by CEP, in an iframe window. While there is currently no list…
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 -
When art is renamed, no notifier is sent In CC2019, at least two notifiers should result from renaming art: kAIArtPropertiesChangedNotifier & kAIArtObjectsChangedNotifier, but neither is sent.
5 votes -
Adjust dashes to corner and path ends via scripting I have dashed lines in my drawing and want to align dashes to corners and path ends. No problem in the Illustrator stroke menu. There are two buttons with dashed lines on it. But there is no script command to do this.
Please add script command for adjust dashes.
5 votes -
[BUG] Extend script via Javascript document.importFile broken between CC2017 and CC2018 Currently this is producing an error in CC2018 Illustrator on Mac
var newFile = new File('/tmp/sample.rtf');
app.activeDocument.importFile(newFile, false);Works correctly in CC2017.
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 -
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 -
ExtendScript経由のスクリーン用に書き出しが固まる 説明
ExtendScript経由で[スクリーン用に書き出し]を実行すると動作が遅くなり,動いていないように見えます(実際は動いていて長い時間待てば終わる)。その間レインボーカーソルが出ています。
JPEGを書き出すときに顕著です。書き出す画像がある程度大きいと,プログレスバーが99%くらいになった後ほとんど進みません。CPU使用率は100%前後になります。
例:1700x1000pxのアートボード8枚を300ppiで書き出すとき,かかる時間は228.175秒(できたJPEGの重さは1点につき2.9MB)同じ条件の書き出しをGUIから手動で実行すると,すぐに終わります。
例:1700x1000pxのアートボード8枚を300ppiで書き出すとき,かかる時間は2秒くらい(できたJPEGの重さは1点につき1.8MB)PNG24は手動よりは遅いですが,JPEG程大きく影響しません。CPU使用率は160%前後でした。
例:1700x1000pxのアートボード8枚を300ppiで書き出すとき,かかる時間は57.745秒次の条件で起こります。
* 少なくともIllustrator 2020〜2022(24.3.0〜26.0.2)
* 少なくともmacOS Monterey 12.0.1(Apple Silicon) / Big Sur 11.6(Apple Silicon)の2環境
* 少なくともMacBook Air(Apple Silicon, 16GBメモリ) / iMac(Apple Silicon, メモリ不明)の2機種
* ExtendScriptのDocument.exportForScreens経由で実行
* オプションJPG 100,300ppi(アートボードサイズは1700x1000px)次の条件では起こりません。
* オプションをJPG 100,72ppiにしたとき
* オプションをPNG24,300ppiにしたとき
* GUIから手動で実行したとき次の項目はあまり影響しないようです。
* IllustratorをRosettaで起動するかどうか。Rosettaにしたらさらに遅くなる
* アートボード上のアイテムを単純なデータにすること。四角いパスとグラデーションだけでも遅くなる期待する動作
ExtendScript経由で[スクリーン用に書き出し]を実行したとき,GUI経由で行うのと同じくらい速く動きます。
4 votes -
Adjusting one gradient causes changes to unrelated gradients on same document adjusting one gradient causes changes to unrelated gradients on same document.
4 votes -
Justification bug, cannot set 'center' in v24.2 using AppleScript Running a script to set the justification of text works perfectly for left and right, but no longer works for center. Putting the example script given in the latest Illustrator CC Scripting Guide, page 122, into a Script Editor visually compiles centre differently to left and right and only works if you remove or comment out the line justifying to center.
4 votes -
Opacity Mask Transparency / Opacity Mask - In layers pallet page item names look different with masks (underline) and opacity masks (dashed). It would be great if you could add this to properties of the page item like mask: none, opacity mask or mask. Identifying these objects is even harder then Envelopes which can only be identified by identifying as plugin object. Worst case putting info in the tag propery would be better then nothing when cresating it. I do not believe a opacity mask can be identified through any form of SDK/Script which makes identifying raster images in the file impossible.…
4 votes -
Executing Extendscript/Javascript from the C++ API As far as I know there is no possible way to execute an Extendscript via the C++ API.
In InDesign we can do so by providing the script as a string and fetching simple output results.Our customers can customize our Plugins by providing their own script in our custom scripting language. Unfortunately our language does not cover all use cases and needs to be constantly expanded. With support for Extendscript/Javascript execution from the C++ API we could circumvent the problem and give the users a lot of flexibility and power.
4 votes -
Unicode support for tool names & toolips The AIAddToolData struct is still using char* for the title & tooltip members. I know it does some kind of localization, but that's really archaic when the rest of the SDK uses ai::unicode.
4 votes -
Update Samples to not require MFC The Samples included with the SDK cannot currently be compiled on Windows unless MFC was installed as part of the Visual Studio installation procedure.
Making the Samples requires two small things:
- Add the following include below the SDKDef.h include in VersionInfo.rc
include "verrsrc.h"
- Change the "afxres.h" include in the .rc of all plugins to instead include "winuser.h"
Doing so will make MFC optional, and not required; ultimately, including 'afxres.h' is including the two headers outlined above so it's just introducing an unnecessary middle man who can be safely bypassed.
4 votes
- Don't see your idea?