Scripting access to templates failing/absent across board ? (OG7 test)

The AppleScript / JavaScript for Automation scripting dictionary list a R/W template property of the document object, but

  1. Attempting to read this in AppleScript -> Apple Event Error
  2. Attempting to read it in JXA -> Apple Event Error
  3. In omniJS, document.template is undefined, and not listed in API docs

It would be very helpful to fix/create this, and I also wonder whether failing to find a template is what is enabling omniJS to crash OG7 with script-created blank documents ?

macOS OG Version (Test 7.4):

    Product: OmniGraffle-7.4.x
    Tag:
    Date: 2017-06-16 12:37:50 -0700
    Builder: omnibuild
    Host: tb1010g.private.omnigroup.com
    Revision: 290018
1 Like

Reading the application’s list of available templates also looks a little broken.

In AS we can write:

tell application "OmniGraffle"
	first item of (available templates) as list
end tell

but we get only Apple Event errors for the class and properties of the reference returned.

By a chance of how the type conversion dice happens to fall, we have a bit more luck in JavaScript for Automation, which manages to return a useful name string.

FWIW various other parts of the AS / JXA scripting interface in OG7 look like they are still blocked at this stage: