The Omni Group Forums

The Omni Group Forums (http://forums.omnigroup.com/index.php)
-   AppleScripting Omni Apps (http://forums.omnigroup.com/forumdisplay.php?f=46)
-   -   applescript to copy an OmniGraffle graphic? (http://forums.omnigroup.com/showthread.php?t=22829)

supertwang 2011-12-07 03:44 AM

applescript to copy an OmniGraffle graphic?
 
Can anyone show me an example of an applescript that copies an existing graphic to a new canvas?

Thanks!
ST

RobTrew 2011-12-08 12:35 AM

[CODE]tell application id "OGfl"
set lstSeln to (selection of front window)
set oShape to first item of lstSeln

tell front document
duplicate oShape to end of graphics of canvas 2
end tell
end tell
[/CODE]

RobTrew 2011-12-08 12:37 AM

or, of course

[CODE]tell application id "OGfl"
set lstSeln to (selection of front window)
set oShape to first item of lstSeln

tell front document
set oSecondCanvas to make new canvas
duplicate oShape to end of graphics of oSecondCanvas
end tell
end tell[/CODE]

tuvanxaydung 2011-12-08 09:56 PM

thanks
 
I also tried doing this but do not have any result, I have encountered some technical problems


All times are GMT -8. The time now is 04:30 AM.

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