Illustrator (Desktop) SDK/Scripting Issues
129 results found
-
Bug: Before and After Export Notifiers Do Not Fire When Export As is Used From the Menu
The below menu command notifiers do not fire when the export option is used:
kAIExportCommandPreNotifierStr "AI Command Notifier: Before Export"
kAIExportCommandPostNotifierStr "AI Command Notifier: After Export"Other menu notifiers do fire, such as "AI Command Notifier: Before Save As" and "AI Command Notifier: After Save As"
4 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.
-
[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 -
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.
44 votes -
Updating annotation drawings as bezier control points are dragged
Hello,
I'm working on an Illustrator plugin to help visualise bezier curve continuity. Screenshot: https://i.imgur.com/rxgqDJL.png
I wanted to ask if there's a way to update artwork annotations as the user drags a bezier path control point? Currently my plugin only updates the annotation drawing once you let go.
I assume this is possible because Illustrator seems to be able to do it for showing useful information such as alignment as you edit curves.
Some extra technical details in case it helps... :)
I started this project using the Annotator example project from the sdk as a starter.
In my plugin…
4 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 -
Javascript erroneously reports stroke color in paragraphStyles.characterAttributes if it has been changed from a color to noColor
AI 21.0.0 2017 Release
---------------------------------------- to reproduce
New Document (defaults: print, letter)
T for text tool, click in document, type "test text"
cmd-return to exit
in Color palette click anywhere in color bar to change text color
in Paragraph Styles palette, click the new style icon to create "Paragraph Style 1"
---------------------------------------- 1st run
run script "bugreport"
results:
fillColor: [CMYKColor]
strokeColor: [NoColor]---------------------------------------- 2nd run
select the "test text" text
press "X" to change the color palette from fill to stroke
click anywhere in the color bar to give the text a colored stroke
in Paragraph Styles palette, select "Redefine…
3 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.
28 votes -
Can you provide a script that will take selected elements and groups and place them on their own layers?
Can you provide a script that will take selected elements and groups and place them on their own layers?
2 votes
- Don't see your idea?