Illustrator (Desktop) SDK/Scripting Issues
61 results found
-
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 -
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 -
exportForScreens() file output naming issues
Natively File > Export > Export for Screens has an option to add a suffix to the output file name, but in scripting the last parameter adds a prefix to the output file name not a suffix as it should to match the desk top user options.
exportForScreens(path, ExportForScreensType, ExportForScreensOptions, ExportForScreensItemToExport, "This adds a prefix NOT a suffix");
1 vote -
Adjusting one gradient causes changes to unrelated gradients on same document
adjusting one gradient causes changes to unrelated gradients on same document.
9 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 -
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.
4 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 -
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 -
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.
15 votes -
.duplicate() does not update selection, crashing Illustrator
selection[0].duplicate()
// redraw()
alert(selection.length)when running this script in Illustrator, you will see that both the original selection plus its duplicate will be selected, but the alert will display 1. Running this script in debug shows that selection only contains one object despite .duplicate() being used. This causes a corruption(?) issue where in reality there are now two objects selected but selection only shows one to be selected unless you do redraw(). This discrepancy will cause Illustrator to crash when trying to set the selection (in specific circumstances) on another line after the .duplicate().
In other situations, whether one or…
2 votes -
placedItem name property doesn't work
Hello,
I'm trying to get placedItem name, but it is empty
//Get active document
var activeDocument = app.activeDocument;//Get all links (or placed items)
for (var i = 0; i < activeDocument.placedItems.length; i++) {
var imageName = activeDocument.placedItems[i].name;
alert("imageName = " + imageName);
}activeDocument.placedItems[i].name returns empty string
2 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 -
Unable to create file or folder object in Illustrator CC2020
I tried to create a file or folder object with a slash (colon) in its name in Illustrator CC2020, but I couldn't.
Also, I was not able to get the file object from PlacedItem.
The same thing happens with AppleScript.In Photoshop CC2020 and InDesign CC2020,I was able to create.
NG Case(JSX)
[File location] desktop > 2020/01 > 01/01Image01.jpg ==> [Full path] /Users/***/desktop/2020:01/01:01Image.jpg
var fObj = File('/Users/***/desktop/2020:01/01:01_Image.jpg'); ==> invalid object
fObj.exists ==> false
fObj.name ==> none2 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 -
Commands from Special characters / Whitespace section gives an error
A simple script:
app.executeMenuCommand('~copyright')
gives an error 1200: 1346458189 ('PARM')3 votes -
retrieve transformation matrix of a symbol instance
there seems to be no way to retrieve a symbol instance's transformation matrix (neither javascript nor SDK).
It is only possible to compare the bounding box to the expected one2 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 -
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.…
6 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 -
Fails to retrieve file creation date | AI 2020, MacOS Catalina
This issue appears only on MacOS Catalina.
Steps to reproduce:
File(file_path).created.getTime()
3 votes
- Don't see your idea?