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 Today's Posts

 
Am I using Applescript's "duplicate" wrong? Thread Tools Search this Thread Display Modes
Quote:
Originally Posted by Daria View Post
when I try to place the copy in a different file, I get an error: "OmniGraffle 5 got an error: Can’t make or move that element into that container."


set preNewDoc to (make new document at end of documents with properties {name:currentName})
save the front window
set newDoc to the front window

duplicate currentGroup to newDoc -- causes error!
Hi Daria-

I didn't try your script, but doesn't "make" return a reference to a DOCUMENT, but you need a reference to a CANVAS to contain the graphic group?

Best, Charles
 
Charles,

You're right. Thanks for helping me!

- Daria
 
Glad I could. Have fun!

Charles
 
 




Similar Threads
Thread Thread Starter Forum Replies Last Post
"Jump to specific canvas" action wrong in exported PDF? [A: Bug, fixed in 5.4.1] Georgy OmniGraffle General 4 2012-07-31 03:44 PM
Varying "Duplicate Canvas" behaviors. dekdekdek OmniGraffle General 4 2010-10-26 07:34 AM
Weird dates... "today" is wrong date --> 2059, 2084 etc.! electroglodyte OmniFocus 1 for Mac 0 2009-11-03 09:39 AM
"No context" has completely wrong count jasong OmniFocus 1 for Mac 4 2007-11-23 08:27 PM


All times are GMT -8. The time now is 12:54 AM.


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