Skip to main content
Participant
June 30, 2014
Question

Save as FXG option not working from script. Am I doing this right?

  • June 30, 2014
  • 2 replies
  • 500 views

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

[1] http://wwwimages.adobe.com/content/dam/Adobe/en/devnet/illustrator/sdk/CC2014/Illustrator%20Scripting%20Reference%20-%20…

This topic has been closed for replies.

2 replies

Harbs.
Legend
July 3, 2014

I'd guess that the FXG options are remnants of when there was built-in FXG support but no longer do anything.

Harbs

Joseph Labrecque
Community Expert
Community Expert
July 1, 2014

I've attempted to modify other script samples from C:\Program Files\Adobe\Adobe Illustrator CC 2014\Presets\en_US\Scripts and use FXGSaveOptions but it outputs a 0 byte FXG file :/