Illustrator (Desktop) SDK/Scripting Issues
75 results found
-
settings raster effects value visible main screen
I need to view somewhere in the Illustrator interface, the value set in the "raster effects settings" panel.
Is there a scripted way to implement this?
I've created actions that set this value to 72ppi / 300ppi so that I can change it when the document becomes heavy and unmanageable (thanks to using only 1 CPU CORE, thanks Adobe ❤).
The problem is that if I save the file, I will probably save it at 72ppi, but for printing the effects are poor and you have to set them to 300ppi.
So having the value always visible on the screen,…2 votes -
exportFile doesn't work with NoUI document
trying to create a "NoUI" document and export as SVG like this:
opendoc = app.documents.addDocumentNoUI();
opendoc.exportFile(file, ExportType.SVG);I get the attached error in AI
I can't think of any other way to export an SVG via script. Obviously there are scripting things that don't work with NoUI documents, but it seems like this one should. Am I doing something wrong?
2 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 -
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 -
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 -
CC2019 CoordinatePrecision2 in Preferences
When doing operations on small vector objects I found that the precision was weird.
After checking the Preferences files I found that the key
plugin/SVGFormat/CoordinatePrecision was set to 3 (like in CC2018 were it works fine)But also found a new key:
plugin/SVGFormat/CoordinatePrecision2 set to 1!After closing Illustrator and updating that value to 3 it works again.
I didn't see any mention of that change in any docs.
Is "CoordinatePrecision2" the new value from CC2019? and "CoordinatePrecision" deprecated?
Thanks!
2 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 -
Executing the script throws the Error 1242: Illegal argument
平素は誠にお世話になっておりますAdobe製品の機能評価をしております
Adobe製品の機能評価をしておりますが対応策があれば教えていただければ幸いです
[Windows11 Pro 22H2] Adobe Illustrator27.9で次のJavaScriptを実行するとError 1242:Illegal argument -argument 1のエラーとなりましたのでバグとして報告いたしますvar textValue = null;
var selectedFont = null;
// アクティブなドキュメントを取得
var doc = app.activeDocument;
// インストールされている書体のリストを取得する関数
function getInstalledFonts() {
var fontList = [];
var fonts = app.textFonts;
for (var i = 0; i < fonts.length; i++) {
fontList.push(fonts[i].name);
}
return fontList;
}
var fontAll = getInstalledFonts();
// ダイアログボックスの作成
var dialog = new Window("dialog", "縦組テキストを配置", undefined, {resizeable: true});
dialog.orientation = "column";
// ダイアログボックスに「テキスト入力エリア」を追加
var textArea = dialog.add("edittext", undefined, "", {multiline:true, scrolling:true});
textArea.preferredSize = [500, 200]; // 幅500、高さ200
// ダイアログボックスに「書体の選択」の追加
var fontDropdown = dialog.add("dropdownlist", undefined, fontAll, {scrolling:true}); // インストールされている書体のリストを取得
fontDropdown.selection =…1 vote -
how can i call these functions in AI via script?
-I would like to open a Multipage PDF with settings set to open "all pages" and "import pages as links".
If the pdf has only one page import it also as a link (if possible do it)Import an Illustrator *.ai file Multi-layouts by importing them as links across multiple layouts.
Set flattener presets:
preset name
various parameters...
Select all (Select / All)
Run the command: Object / convert transparency / Previously saved preset / OK
I saw among the commands that there is an openOptionsFreeHand could I create a script that opens the freehand files for me?
How could…
1 vote -
variables.removeAll(); does not work
When I execute variables.removeAll();. error occurred: 1346458189 ('PARM').
On the other hand, dataSets.removeAll() works.1 vote -
ExtendScript Debugger 2.0.3 for VSCode fails on "doScript" method
When a script containing "doScript" method is run from VSCode to AI 2022 using any version of ExtendScript Debugger 2.x it locks up Ai 2022 requiring a force quit. VSCode must also be reloaded before any debugging can continue.
Rolling ExtendScript Debugger back to v1.1.2 eliminates the failure at the expense of the more advanced features of v2.x.
1 vote -
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 -
Listbox checkmarks not displaying in Illustrator 2020
Checkmarks are no longer being displayed on listbox items in Illustrator 2020. Please see the attached image showing the listbox in Illustrator CC 2019 and Illustrator 2020. This is on a Windows PC.
1 vote -
Add ability to create a File object from an HTTP endpoint
Adding the ability to create a File object from an HTTP endpoint rather than a physical document on disk would be very useful for scenarios where you want to reference a linked item from an online asset management system, where it is centrally stored and versioned, as opposed to being forced to download the file to disk. This would also help with management of access and security relating to these assets.
1 vote
- Don't see your idea?