I’m clearly being dim, but I cannot figure out how to use FileWrappers to export the selected graphics from a canvas. I would even be happy with all of the graphics on a canvas, or the entire canvas if it has a non-infinite size.
In OmniGraffle: FileWrappers there’s a recipe for shipping a PNG to OmniFocus, that I’ve tried to follow…
w = document.fileWrapper('public.png')
generates a FileWrapper with one child per canvas. Each canvas has no contents:
w.children[0].contents.length
=> 0
And even then, FileWrapper has no save() functionality.
Trying to set the preferredFilename of a child results in Omnigraffle crashing:
2018-07-31 11:17:10.779 PDT OmniGraffle: objc[75784]: __weak variable at 0x7f971ddbdfd8 holds 0x608001877b40 instead of 0x600000bf3000. This is probably incorrect use of objc_storeWeak() and objc_loadWeak(). Break on objc_weak_error to debug.
Any help would be appreciated to save my fingers from splat-option-e fatigue!