Copy link to clipboard
Copied
Is this a known issue? Even the scripting guide PDFs don't match the AppleScript dictionary for the last few versions of Illustrator. Is this a known bug?
Copy link to clipboard
Copied
Is this a known issue? Even the scripting guide PDFs don't match the AppleScript dictionary for the last few versions of Illustrator. Is this a known bug?
Copy link to clipboard
Copied
I'm seeing this same issue. Unfortunately at this time I don't know how to get around this failure. I'm not getting outlined font info that is present when using the UI to perform the export.
Is this an intentional deprecation?
Copy link to clipboard
Copied
There is a note buried in the scripting guide about the SVG export options needing to be explicitly created, it's not in the online reference guide, but instead of doing something like this...
tell current document
export to outFile as SVG with options {class:SVG export options, coordinate precision:2, save multiple artboards:true, artboard range:"Artboard 1", minify svg:true, set type of SVG:unique svg}
end tell
try creating the SVG export options and then pass that to the export method:
set exportOptions to {class:SVG export options, coordinate precision:2, save multiple artboards:true, artboard range:"Artboard 1", minify svg:true, set type of SVG:unique svg}
tell current document
export to outFile as SVG with exportOptions
end tell
Copy link to clipboard
Copied
Thank you for the suggestion. Although I didn't update my post I did have an attempt at extracting the settings which look like this:
set exportOptions2 to {class:SVG export options, coordinate precision:5, font type:outline font, minify svg:true, raster image location:link, responsive svg:true}
tell current document
export to outFile as SVG with options exportOptions2
end tell
At export I'm seeing Error: error in user parameter list (paramErr:-50)
I did some additional work at implementing embedded js to handle the export, but haven't gotten back to it since the pandemic hit.
Copy link to clipboard
Copied
Did you ever figure out the embedded js? That is what I am trying now, but I cannot figure out how to write the property for setTypeOfSVG. The property is listed in Illustrator's scripting dictionary in Script Editor (not found in Adobe's scripting reference), but doesnt list the value type.
The syntax works for the applescript counterpart, but as you discovered, the SVG export options class throws an error and doesnt apply the settings without it.