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

 
Changing size of canvas in AppleScript Thread Tools Search this Thread Display Modes
Hello,

I'm trying to create a canvas of a specific size via AppleScript with the current three lines, but they keep giving me an error.

Code:
close front window
make new document with properties {template: \"Blank\"}
make new canvas with properties {page size: {600, 600}}
execution error: OmniGraffle Professional 5 got an error: Canít make or move that element into that container. (-10024)
If I try not closing it, but editing the existing canvas, I get a different error.

Code:
set page size of properties to {600, 600}

OmniGraffle Professional 5 got an error: Canít make page size of properties of canvas of window 1 into type reference. (-1700)
Does anybody know if it's possible to put a new canvas into a document of a specific size from Applescript this way?
 
Found my solution.

Code:
close front window
make new document with properties {template: \"Blank\"}
set properties of first canvas of first document to {canvasSize: {pageWidth, pageHeight}
Just needed to change the handle to the document and not the canvas itself.
 
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes



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


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