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

 
How to create key-value pairs when creating a shape Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
I have an AppleScript that creates a shape with a variety of properties. I have noticed that Omnigraffle 5 has the ability to create key-value pairs to store additional user-defined information, and I would like to do this programmatically (using AppleScript). But I cannot figure out the syntax. Can anyone help me?

Here is how I am currently creating my shapes:
"
on makeShape(aTitle)
tell application "OmniGraffle Professional 5"
tell canvas of front window
return make new shape at end of graphics with properties {text:aTitle, vertical padding:5, autosizing:full, side padding:10, magnets:{{0.5, 0}, {-0.5, 0}, {0, 0.5}, {0, -0.5}}, origin:{(x of canvasSize) / 2.0, (y of canvasSize) / 2.0}}
end tell
end tell
end makeShape
"
I would want to add things like type="node" or author="ian" and various other terms.

Thanks,


Ian.
--
 
 




Similar Threads
Thread Thread Starter Forum Replies Last Post
Possible to Create Spatial Offset from Line to Shape/Object? acowan OmniGraffle General 3 2013-01-03 09:00 PM
AppleScript to query the user data key/value pairs apl OmniGraffle General 2 2012-01-14 01:05 AM
Create new smart shape? ramatsu OmniGraffle General 0 2010-10-26 09:55 PM
Need help creating a script for creating a next action gcrump OmniFocus Extras 9 2009-02-21 06:10 PM


All times are GMT -8. The time now is 05:46 AM.


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