Copy link to clipboard
Copied
I have a script that seemed to work yesterday, but today I am getting a popup that says "Can't save the illustration", followed by a popup that says "The object "Export As" is not currently available."
If I hit "Stop", I get this error in VSCode:
function exportFileToSvg(dest, doc) {
var exportOptions = new ExportOptionsWebOptimizedSVG();
var type = ExportType.WOSVG;
var fileSpec = new File(dest);
exportOptions.embedRasterImages = true;
exportOptions.cssProperties = SVGCSSPropertyLocation.PRESENTATIONATTRIBUTES;
// exportOptions.cssProperties = SVGCSSPropertyLocation.ENTITIES;
exportOptions.svgMinify = true;
doc.exportFile(fileSpec, type, exportOptions);
}
It appears this was failing because the path (dest) that was being passed in didn't exist.
Kind of an unfortunate error message, but I have this working again.
Copy link to clipboard
Copied
It appears this was failing because the path (dest) that was being passed in didn't exist.
Kind of an unfortunate error message, but I have this working again.
Copy link to clipboard
Copied
awesome, thanks for the update