jtCount: An OmniGraffle AppleScript that Counts!
Tested and compatible with OmniGraffle 5 Standard, OmniGraffle 5 Professional, and OmniGraffle 6 Professional for Mac.
As JTech’s project manager I am always keeping an eye out for ways to save time and money throughout our production process. We use many tools internally to help us manage our projects, develop client-facing documents, internal documents, and reference material that helps us execute work more efficiently. All of our web development flowcharts and page wireframes are created in OmniGraffle, a program by The Omni Group. Like many pieces of Mac software that utilize Mac OS X’s built-in tools, OmniGraffle supports AppleScript, providing a useful way to extend its functionality and capabilities.
Our OmniGraffle flowcharts include many objects that represent items on the project budget, including pages, forms, and various features. As we iterate on the document with our clients, we translate the quantity of each type of budget item into a spreadsheet, which is configured with formulas to automatically calculate the project’s cost. The flowchart changes with every iteration, and a manual tally can be laborious. There's always that moment when your coworker counted a different number, after which the counting commences again.
So, I thought to myself, how great would it be if we could just run a script that automatically calculated the quantity of items based on some sort of unique value key? I spent quite a while searching forums and resource websites for an OmniGraffle counting script but was unable to locate one. Thankfully, our VP of Technology was willing to write an AppleScript for me, and jtCount was born. We built the script to be flexible, so that it could grow with our process. After using jtCount internally for a bit, I decided it might be beneficial for others out there with the need to count objects in OmniGraffle.
Here are some of the possible ways jtCount could be used:
Calculate and estimate cost, labor; generate shopping lists in various contexts:
- Count trees, shrubs, and other plants in a landscape design
- Count outlets, can lights, switches, windows and doors in architectural plans
- Count capacitors, resistors, transistors, diodes, relays, etc in electrical schematics
- Count atoms, bonds, molecules, etc in chemistry diagrams
- Count individual objects, object groups, groups of groups, and on!
The jtCount AppleScript for OmniGraffle iterates recursively!
If you find jtCount useful, please contact me to let me know how you are using it! And if you have any questions, use the same form and I’ll do my best to lend a hand. In an effort to make this script useful to as many people as possible, I created a tutorial OmniGraffle file that will help people who are unfamiliar with AppleScript to customize it for their needs. The .graffle file is available for download in this post, with jtCount embedded. Feel free to share it with attribution.
Download: jtCount - An OmniGraffle AppleScript that Counts!
Tested and compatible with OmniGraffle 5 Standard, OmniGraffle 5 Professional, and OmniGraffle 6 Professional for Mac.