Scripting Omnigraffle

I knew that OmniGraffle has good support for AppleScript, but I didn’t realize how much until I got some answers to a request I made on on the applescript-users mailing list. For anyone interested in scripting Omnigraffle the two key pieces of information I obtained are:

  1. You can discover the code to generate a shape by selecting the shape and the Copy as AppleScript entry on the contextual menu. This creates AppleScript code to reproduce that shape, including text it contains. (This seems like a unique feature and a great way to learn an application’s scripting moves.)

  2. There is a OmniGraffle AppleScript discourse forum.

What prompted this inquiry was my need for some way to is generate many graphic images as part of some tests. OmniGraffle exports to a large number of formats. Together with its scriptability that will make generating the images I need quite easy.