(Apologies if this is an Illustrator scripting question rather than a CEP specific extension one)
From Adobe Illustrator CC2014 HTML5 extension I am using app.activeDocument.exportFile to export the activeDocument to SVG.
I have that working great but what happens is that the exported file becomes the active document (replacing the .AI document that was open) and I do not want this to happen?
Can anyone explain this behavior and how I could change it.
I got around it by closing new doc and reopening
var srcFile = app.activeDocument.fullName;
app.activeDocument.exportFile( fileSpec, type, exportOptions );