I see that the Illustrator Scripting reference document for CC 2014 [1] has references to FXG, FXGSaveOptions, etc. I thought I would give it a try to see if I can save a document to FXG. Here is what I am trying:
var myDocument = app.documents[0];
var myTextFrame = myDocument.textFrames.add();
myTextFrame.position = [200,200];
myTextFrame.contents = "Hello World!"
var newFile = new File("c:/temp/fxgfile");
var fxgSaveOptions = new FXGSaveOptions();
myDocument.save(newFile,fxgSaveOptions);
This causes the file to get saved as fxgfile.ai and not fxgfile.fxg that I was looking for.
Any ideas?
Thanks,
Om