var savefile=new File("~/Desktop/exp.fxg"); var exportOptions = new FXGSaveOptions(); exportOptions.preserveEditingCapabilities = true; app.activeDocument.saveAs(savefile, exportOptions);