The Omni Group Forums

The Omni Group Forums (
-   OmniGraffle General (
-   -   Tracking variables / Counting per object - LONG(ish!) (

ivanrostas 2011-06-30 11:48 PM

Help with Applescript counting of objects
1 Attachment(s)
John Gersh in this forum very kindly answered a query I had a little over 5 years ago, where I wished to count objects on a screen and provide that value to an excel spreadsheet. Here is a link to that thread:


Unfortunately, I hit a roadblock when I found that all of my objects had the same name (after all, they were just circles with different numbers in them)...

So I gave up and since 2006 have generated a few thousand Omnigraffle generated drawings by just manually transferring the totals of 'select similar objects' across to a spreadsheet.

But I thought that with OG5's new Data Key / Data Value values I could give my various objects (circles with numbers in them, triangles, etc) a Data Key called SKU and a Data Value of say, 12345, with the Data Value differing for each object obviously.

I then hoped to set up a table up in the corner on the same drawing which had a picture of the object and it's SKU number and a QUANTITY value beside it.

I have bought a copy of Kochan's Beginning Applescript, and have had a look at the library, but wondered before getting too far if what you had kindly spelled out for me all those years ago could be only slightly modified to suit what I had in mind today.

I pursued some research in the forum archives, and found some conversation threads that were promising, but technically beyond me at the moment:




I would greatly appreciate any insight. As I have said, as a design consultant OG4 has been an incredibly productive tool for me. The move to OG5 has been compelled by hopefully being able to automate the counting of our objects.

I would love to have another Bill of Materials table being drawn on a layer (now canvas in OG5?) as the drawing is being done!! But thats just dreaming now isn't it?

Many thanks, in advance.


tmiller 2014-04-04 02:58 PM

Hi Ivan - I know your posts are a few years old, and you have more than one, but I decided to respond to both in case the system notifies you of a reply. You can download a script that counts objects and outputs the count on the canvas in our blog post: [url][/url]

All times are GMT -8. The time now is 01:45 AM.

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