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