Today I upgraded my OG to 7.8.1 and then found that all my apple script is not working any more. The property “current export settings” is removed from OG 7.8.
There is any reason to remove this property, and are there any workaround to do the same thing?
The reason that current export settings was removed from our AppleScript dictionary, is we wanted to separate the ability to define the saved export settings in an OmniGraffle document versus setting up temporary export settings that are only applied by a script. With that change we now have just export settings which are the saved export settings for a document and a new export with properties command, which allows the script to export a file with its own independent settings. The changes you’ll need to make will likely center around using this new export command, as you’ll need to use this instead of the save command if exporting to a different file format (i.e. png, pdf, etc).
If you can share an example of one of your scripts, I would be happy to point out the changes needed to make it work again with the updates to our AppleScript support.
It seems that the release notes of OG7.8 doesn’t indicate this break change. So I download several versions and test one by one to find the changed version. Could you please add script break change to release notes? It’s very useful for the guy using script.
Sorry for the trouble here! The issue you’ve described with resolution sounds like one that we’ve addressed in the latest test build. If you’d like to download and install that test build to see if the issue is resolved, you can find it here: https://omnistaging.omnigroup.com/omnigraffle/
Sorry! This looks to be a different bug specifically with the export with properties command. It seems it just isn’t using or respecting the supplied resolution or scale properties that can be provided right now. I’ll get a bug filed about this, and hopefully we can get that fixed soon. I should note there are some other bugs due to this change the we want to address (for instance, not all the same export settings that could be defined previously are accessible at the moment). So hopefully this will get much better soon.
For now, the workaround is to skip using with properties in the export command, and instead use set export settings to {resolution:2.0, scale:1.0}. Note this needs to wrapped inside a tell block for the corresponding document or written as set export settings of front document/theDocument to...
Sorry for the inconvenience this causes right now, but hopefully we’ll have these changes ironed out soon!
Indeed it looks like the current export type set in a document can block the resolution property of export settings from being respected when set. I’ve filed a new bug report to let team know about this as well!
Can you clarify for us what goes wrong sometimes when you don’t add in this delay? Do you get an error or does the script run “successfully” but not do everything it should?