View Single Post
Originally Posted by apl View Post
I managed to find a solution should anybody else try scripting with the key/value user data dictionary.

The following script fragment generates a list of shapes with the key/value pair of aURLkey and "Hello".

tell application "OmniGraffle Professional 5"
	set matchingShapes to shapes of canvas of front window whose value of user data item "aURLkey" is "Hello"
end tell
Hope it helps
Yes it does - many thanks, I have been struggling to discover the syntax to write to a user defined key value pair and your code snip was a great help. My aim is to add user key pairs to existing shapes but to edit the data in a predefined shape I'm using:
tell myGraphic
set the value of user data item "MyKey" to "Some Data"
end tell