The Omni Group Forums

The Omni Group Forums (http://forums.omnigroup.com/index.php)
-   OmniGraffle General (http://forums.omnigroup.com/forumdisplay.php?f=10)
-   -   Tracking variables / Counting per object - LONG(ish!) (http://forums.omnigroup.com/showthread.php?t=21509)

ivanrostas 2011-07-01 12:48 AM

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:

[url]http://www.omnigroup.com/mailman/archive/omnigraffle-users/2006/004114.html[/url]

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:


[url]http://forums.omnigroup.com/showthread.php?t=15096[/url]

[url]http://forums.omnigroup.com/showthread.php?t=8202[/url]

[url]http://forums.omnigroup.com/showthread.php?t=18144[/url]

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.

Ivan

tmiller 2014-04-04 03: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]https://www.jtechcommunications.com/blog/blog-detail-12[/url]


All times are GMT -8. The time now is 10:50 PM.

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