The Omni Group
These forums are now read-only. Please visit our new forums to participate in discussion. A new account will be required to post in the new forums. For more info on the switch, see this post. Thank you!

Go Back   The Omni Group Forums > OmniGraffle > OmniGraffle General
FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
Applescript in OG6: Can no longer get graphics of a group Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
I can find no way to get graphics of a group in OG6.

Here's the code that works in OG5, with a group of three circles selected:

on run
tell application id "OGfl"
set sel to selection of front window
set g to item 1 of sel
display dialog class of g -- displays "OGGR"
set glist to graphics of g
end tell
end run

In OG5, glist is set to a list of the group's graphics:

{graphic id 40446 of canvas id 1 of document "graphics test.graffle" of application "OmniGraffle Professional 5", graphic id 40447 of canvas id 1 of document "graphics test.graffle" of application "OmniGraffle Professional 5", graphic id 40448 of canvas id 1 of document "graphics test.graffle" of application "OmniGraffle Professional 5"}

in OG6, the "set glist" line returns this error:

Canít get every graphic of graphic id 40350 of canvas id 1 of document \"graphics test\"." number -1728 from every graphic of graphic id 40350 of canvas id 1 of document "graphics test"

And if I say the following (which also works in OG5):

set glist to (graphics of g) as list

I get, humorously, a one-item list containing a list reference - very meta:

{every graphic of graphic id 40350 of canvas id 1 of document "graphics test" of application "OmniGraffle"}

Note, however, that getting the graphics of a canvas works fine. I didn't test getting the graphics of a layer (though shared layers still return invalid graphic references)

I wish you would have beta tested before releasing. You should put OG5 back up on your site, and give anyone that buys the full version of OG6 a free license for OG5, at least until it's all of the bugs are worked out.
 
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes



All times are GMT -8. The time now is 01:31 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2019, vBulletin Solutions, Inc.