lastExportedFilePath

I am trying to understand GSInstance.lastExportedFilePath. The documentation seems to contain an accidental copy of GSInstance.interpolatedFont.

In my script, I simply want to export the current font, as if pressing cmd+E, enter, enter. How can I achieve that? The instances’ lastExportedFilePath all give me None. How can I get the folder that was most recently exported to (for the given single/VF type)? Do I need a hidden method of GSApplication (which would seem more appropriate)?

There’s a Glyphs default:

Glyphs.defaults["GXExportManual"]  # Variable
Glyphs.defaults["OTFExportPathManual"]  # Static

thus is the path to the .otf file from the last export of that instance. (e.g. Rainers Font tester script use it to find the font file.

Thanks for your help!

Is it persistent, or is it reset when the file is closed and re-opened?

not persistent.

1 Like