Select the path
Cmd-Shift-Option-F12 to open the secret programmer's debugging palette
In that palette, scroll down until you see a section called "object tree"
Click on the 'path' label that is in bold-face (which indicates the object is selected)
The "objects" section above will then display various data about the path, including its area in square pts. Negative areas indicate counter-clockwise paths, positive areas are clockwise.
If the object you wish to measure is not near the top of its layer in the stacking order, you may wish to duplicate it to the top via Copy, deselect, Paste in Front, since it can be hard to find lower-down objects in the debug palette window.
Warning: This palette is not supported. It intentionally does not process many notifications, and can therefore cause crashes if you leave it open while editing the document, especially edits that delete objects which it is displaying data about.
Holy super cool batcave method. That's awesome!
I am so stoked about this tip. Thanks so much!
Here's an alternative method that might work better for some shapes. (It's not quite as neat as Terri's.)
Make a PDF of the artwork, and open it in Acrobat 7 Pro or Acrobat 8 Pro. Open the Measuring toolbar (View > Toolbars > Measuring). Choose the Area Tool. Drag around the shape, creating a polygon. When you close the shape, the area will be displayed.
There are fancier things you can do (there's are Measuring (2D) and Measuring (3D) preferences panes), and you can actually export measurements to an Excel spreadsheet. This is designed for industries like Architecture.
Folks:<br /><br />AI CS3 MacOS iMac Core Duo<br /><br />I also need to measure the area of objects (simple polygons) and I do not have Acrobat, so the only option I can see is the utra-cool "secret programmer's debugging palette". But it doesn't seem to work for me. No matter how many objects are currently selected, it doesn't list anything. Under "Artwork Object" there's nothing but "<no current>" Ideas?<br /><br />It would probably be sufficient for my purpose if there was an constant-area reshaping function...<br /><br />Or... What?<br /><br />TIA,<br /><br />Henry
That's the way it appeared to me until I clicked "Object Tree" near the bottom of the palette.
I haven't used it, but the Telegraphics website (http://telegraphics.com.au/sw/) says they have a free plugin that will calculate the area of a path. Might be worth a look.
As it said in the prior post, to see the information about a particular object, you have to click on the label for that object in the Object Tree area. It is not necessary that the object be selected, it is simply that selecting the object makes it easier to tell which label is the right one, since it will be bolded.
Notice the label in the screen shot that says "path" and is bold and underlined in the Object Tree area. Also notice the instructions to click on the bold word "path".
If the file has a lot of objects in it, is is often easier to paste a duplicate copy of the path at the top of the top layer, so that it will be the first non-layer object shown in the Object Tree area.
It works best for me if I copy and paste the shape into a document of it's own, so it's the only thing in the object tree.
Select the shape, open the batcave window, open that window up so you can see all of the info that shows up, click on the object "button," click on "path" right below. It should pop up a whole pile of info, including the area. It seems like sometimes, I click on the wrong thing first and have to start over at the very beginning with a new document.
To get the area in square inches, I divide the "area" by 72 twice. That's right, right? It's not the other point measurement (72.xxx) is it?
Thanks for your help.
Just after posting my query I tried to find a utility that would do the job, and the only one I could find that isn't part of a big, costly package is indeed supplied by Telegraphics. (Thanks Telegraphics!) It's called "Patharea". Unfortunately, CS3 isn't yet supported. (I tried the version for CS2 and got a plug-in load error.) so I unzipped my old copy of AI10 and tried with the "Patheara" for that version. It's a tiny bit clunky for my purposes --can't seem to leave its window open and can't copy data from it with cmd-c-- but it is perfectly adequate.
FYI, I'm tracing land plots on existing surveys and drawings. The areas (in acres) of some closed paths can always be determined. I measure a few of these and determine the scale factor for the particular graphic. Then I trace an unknown area-of-interest and apply the scale factor to get acreage value I want. So far, so good: I'm seeing consistency errors typically below 5% on a old survey -- as good as I can expect for tracing plots on a photocopy of a pen-and-ink drawing about 100 years old.
I played with the "secret window" but I didn't discover the trick of clicking near the bottom. Now that I have seen your experiences using this window, I think it will work just fine for me.
Worth mentioning: I had _no_ idea of the number and variety of plug-ins available for Illustrator. Kid-in-a-candystore!
This .zip archive contains a script named JET_GetArea. You select a path, call the script from the File>Scripts menu, and the script returns the alert shown:
The same caveats which Teri mentioned about compound and self-crossing paths apply.
Such a script could probably be easily be modified to:
1. Prompt the user for drawing scale.
2. Return the area value in acres, based on that scale.
That is VERY cool!
Hmmm, now, another scripting language to crack...just enough to get the square points text on the clipboard: that would do it.
Thanks VERY much!
> ...just enough to get the square points text on the clipboard: that would do it.
Download the .zip again from the same link as given above. It now contains an additional script, JET_AreaLabel.jsx. That script works like the first, except that instead of just displaying the area in an alert, it also:
Creates a PointType textFrame centered on the bounding box of the selected path, containing the text of the alert. (You can delete the unwanted units of measure.)
Copies just the value (no additional text) of the area in square points to the clipboard. You can then paste that value into another program. (For example, you could set up an Excel worksheet with cells to calculate the conversion to acres, based on the drawing scale(s) you are using.)
The script uses the app.cut() function new to CS3, so it may not work in earlier versions.
> Worth mentioning: I had _no_ idea of the number and variety of plug-ins available for Illustrator
Also worth mentioning: If this is a frequent kind of work for you, I really don't know why you are doing it in Illustrator. Illustrator's feature set is practically antagonistic toward drawing to scale. For example, you could be doing the same work in Canvas, where you could see both the area and perimeter of the path always displayed right there in the Object Specs, and use live dimension tools--all with values expressed in true-measure at the actual scale you are using in your drawing.
Wow, talk about service. THAT is exactly what I need.
And you've taught me how to fish -- those are great examples, and I can take the scripting from here if I need any more adjustments, which I probably do not.
Thanks for the recommendation for Canvas, but I should not need to do this kind of task routinely. Once I get a set of values for a total of about 6 geographic areas represented in exactly two aerial photos, I should not need to estimate areas enclosed by paths ever again. All I need is decent estimates of the sizes of these areas -- I'm not looking for perfection, just confirmation of some parameters I already have.
Since you mention it, on a completely different project, I'm working with maps -- tracing old maps of towns Eastern Europe to help understand and document the period between World War I and World War II. (My grandparents were from Old Poland, now Belarus.) In my search through Illustrator add-ins I saw some potentially useful functions that might help with that work.
(Over the course of my professional life, I've definitely seen lots of cases where one is tempted to adapt a particular software tool to a new use, things get out of hand, and one ends up doing things never intended. [To show my age, here's my favorite example: Writing an full-screen editor in the command-line editor TECO.] Almost certainly there are cartographic tools yet more a suited to my mapping tasks -- but I own Illustrator, I'm somewhat adept with its simple functions, and --even if the cartographic software is no- or low-cost, I'm not certain I could learn a radically different software package for that purpose. OK... Enough philosophy, right?)
> I'm not certain I could learn a radically different software package for that purpose.
I understand. To me, adding to my toolbox another software similar to one with which I'm already familiar but which has features expressly designed for the task at hand, is less work than learning a scripting language.
So, yeah, at least the scripting option is there, and that's a good thing. But as you can see from the first script, getting the area of a pathItem is a simple one-statement call to a pre-defined property of a pathItem object: area. So why isn't access to that property provided in some appropriate place in the program's standard interface?
Anyway, I'm glad the script helped. Maybe others will get use from it, too, and at least thereby avoing having to re-invent the wheel again. ;-)
JET:<br /><br />Thanks for your response! Hmmm, we seem to be drifting away from the original topic. If you want to continue off-line... let me know.<br /><br />Each of us builds our toolbox differently -- hopefully we know ourselves well enough after a while to know what works best. I generally prefer to be more adept at few distinct software packages, as opposed to trying to remember the details --and the general paradigm-- of more packages. (For the life of me, I can't retain how to use ImageReady, for example -- I just don't use it often enough.) That said, I'm OK with learning just the features I need to do my work, which places me in danger of missing out on potentially very useful tools. With unavoidable software from one vendor I find it is best to stick to the lowest-common-denominator functions and to avoid customization -- maybe a superstitious way of improving stability of the product.<br /><br />I have a history of working with code going back to the early 1970's so I'm quite OK with scripting, except that, well, the nature of coding has changed. To quote the songwriter, "the thrill is gone." There are too many (scripting) languages to learn, they are often complex, and typically there's a huge array of library functions (or equivalent) in each. A daunting task, each one of them.<br /><br />As for including functions like area in the standard interface, I think you mean the GUI, and I have mixed feeling about that, especially as features accumulate, and the GUI gets more and more difficult to navigate. If I did not have this particular problem, I'd probably be frustrated by seeing "length" and "area" functions in the GUI -- just some extra stuff that I don't need -- or some functions that I really might want to learn, but don't have the time.<br /><br />Hmmm, you would like to build really innovative features in AI's JS, and I hope you do that. (Sorry, my task wasn't really very interesting <grin>.) <br /><br />Thanks,<br /><br />Henry
> If you want to continue off-line...
What, and have everyone else miss out on this stimulating intellectual discourse? Not a chance.
>>Not a chance.
I second that. There are always lurkers who enjoy the information.
Is there a way to calculate the area of selective components in a photo?
For example, I have photos of plant leaves in a chamber, and I'd like to be able to calculate the 2D (top down view) surface area of the leaves?
1. Make sure the background of the photo (the bottom of the chamber) is of high contrast to the plant leaves.
2. Either posterize the image in Photoshop, or with auto-trace settings in Illustrator. (see LiveTrace in the help documentation.)
3. Auto-trace the photo. Use the script referenced above to get the area of the resulting path(s).
Just recently had to come up with a solution for a similar problem and stumbled upon this thread. Excellent info here, Thanks!
I just had a need to measure the area of AI cut-out letter templates for signage and the Cmd-Shift-Option-F12 solution worked a treat in CS4 as well!
Many thanks to all the contributors.
I found your post and script for calculating the area of a shape. Thank you for creating and posting the script. It's (almost!) exactly what I'm looking for. I have images over which I've traced multipe polygons (on the order of 40-100 polygons per image) and I'm ultimately trying to calculate the % area of the total image that the polygons cover. Your script works beautifully, except that with multiple polygons, I am forced to select each polygon individually. I have approximately 60 images to repeat this process over ...
I have some experience coding in Matlab and C -- is there any way to run a loop (or something) to automate this process and find the area of multiple polygons at one time? I would really appreciate your help!
I am looking for a method to measure a path area, like everybody else on this thread.
It seems that I am the least sophisticated person around, since I am not sure how to load the script JET provided.
Any hints for a beginner? I have a 9.0.1 Illustrator edition in Windows.
Also following the method Terri recommended, Shift-F12 did not produce the debugging palette.. awful luck - what is to be done?
thanks a bunch
The scripts by James do not work in 9, and the debugging palette requires Ctrl+Alt+Shift+F12, but I doubt whether you can get to the bottom of it and see the area.
You may download the free Telegraphics Patharea filter (and the corresponding Pathlength) here (at least Patharea works for 9): http://www.telegraphics.com.au/sw/
An old thread from the Mac side, and with your lost ID, Jesse. By the way, John has said that when (maybe I should say if) they get the split ID solved, they may be able to merge doppelgangers into the main IDs.
What's this doing back up here? ;-)
I've since made a page describing the debug window method - I think you're missing a key there, but I'm not sure what the combo is on the PC...
The Win combination is Ctrl+Alt+Shift+F12 (exact match), and it does invoke the debugging palette.
However, in 10, apart from being somewhat simpler, even when a path is chosen it says:
Artwork Object: <no current>
So I believe it only works from CS on.
Some names from the past.
..appreciate very much the feedback.. indeed I have a sorry old Illustrator version. I was able to invoke the pallette with the combination you posted but the path area was not there. So I downloaded Jacob's filter and now I am trying to see how to plug it in. If you have a hint, I appreciate -
thanks again to both of you!
Judging from 10 (on XP), I believe it is (expressed as path, > means \):
C:>Program Files>Adobe>Illustrator 9>Plug-Ins>Illustrator Filters
It worked very well - great stuff!. I am a physician and I am working on cardiac MRI.. such as calculating the heart function using slices of heart images in systole and diastole (when the heart is squeezed or full of blood).
.. we can write a little medical paper comparing really pricey software (GE, Siemens, Medis you name it..) with this method for people with not too many pennies in their pocket. The advantage of using Illustrator is that you can blow up the images up to the point of loosing resolution, and trace the margins of the heart with an accuracy that would make any GE guy cry for his mama..
I thought even a cm further.. for simple-minded people (such as physicians for example) one would like a way to input the area of one slice directly into an equation. For example would be a way to create a routine that would take the number of the area of one slice and input it in this equation? Such as to create a little square where you put the slice, you trace it and then the program takes that number and pitches it in the equation without you writing it down on a paper.
You are welcome, Avi.
I am trying to buy CS5 for the hospital I work with (they said more or less with a joke they would not accept on their computers stuff older than the hospital itself). Just to see if I can use the Telegraphics plug-in I downloaded a trial version of CS5. Surprisingly it did not have the Filters tab on it. I assume this is just a drawback of the trial version, and I will find that particular tab on the real product. Is this accurate? Or should I find the plug-ins and filters on a different tab?
Thanks for info
Filters are now in the Object menu.
I found this whole thread very interesting. I remember stumbling across it first time it appeared and was very happy to rediscover it as it contained Teri's trick window which I'd forgotten about
It inspired me to add a forth method to the equation, which just got publishing on our Astute Graphics blog: www.astutegraphics.com/blog/calculating-an-objects-area-in-illustrator/
I thought that it may be of interest as it provides a method to calculate the area of all object types - including images, even if the result is more approximate compared to the precise results offered by the afore-mentioned script, plugin and debugging window. But I concede that the method isn't free to those who haven't already bought Phantasm CS Publisher, which the other methods are.
I wanted to thank all those who contributed to this thread, especially James (JET) and Toby (Telegraphics) for producing tools I genuinely use myself!
It is inappropriate to post links on your website to someone else's website without asking permission.
All links removed as requested.
Thank you. I trust you will now remove the completely unnecessary reference to my script and the "removed at author's request" note.
This comment on your site, by the way, is erroneous:
Each method...all have the same disadvantage; they can only provide a result for simple paths – not compound paths...
Finding areas of other object types would be similarly trivial. The area of a raster image could simply be based on its bounds. Getting the area of a clipping path is a simple matter of directSelecting the path before running the script.
So you might also reconsider that particular marketing argument for your plug-in.
JET - please re-read my blog post. You will now find no mention of "JET..." (we have to say there were 3 methods in this original forum pot... because there are). You will also perhaps see that I clearly state the the methods here are free and praise them. I really don't see anybody buying a £139 plugin just for this solution. But it made me curious to see if there was another method with our tool. Call it marketing if you like, but I felt I was clear, honest and generous in my praise of what you have achieved with your scripts.
I am sure that much more is possible with scripts.
I trust this is now the conclusion of this thread of the debate. I had no intention of upsetting you. Life's too short.
Now back to enjoying Sunday.
dude wher eon earth did you come up with that?it seems like a buried
secret of adobe.nice posting ;-)
Just a few Sunday comments:
It is worth mentioning that the debugging window does not show the required information up to 10, so this method is only usable from CS (hopefully) on; this might be mentioned in Important notes.
You have a few misspellings in the blog, the most important one being Terri which should be Teri; a rather common one, regularly seen in this forum.
With regard to your mentioning non Phantasm solutions, as I see it, your explicitly non mentioning the solution by James is rather explicit and thereby conspicuous; besides, the contents is not quite updated, and your mentioning their inability to deal with compound paths still includes all three methods, in other words also the one by James.
I would suggest your changing the introduction as follows (shown as two sets with removal of the BoldItalics in the first one and insertion of the BoldItalics in the second, because seemingly colours and strikethrough do not work here in the forum):
Following a long-running thread on the Adobe Illustrator forum [click here to read], it emerged that there were three (We have agreed to not discuss the third.) methods to measure the area of a vector path within Illustrator. It was interesting to see that each approach was different – and free – and included a plugin and a hidden window within Illustrator intended for debugging by the development team. Each method has it own advantages, but all have the same disadvantage; they can only provide a result for simple paths – not compound paths, clipped paths, etc.
In this tip, we’ll have a look at all the previously-disclosed methods plus a forth option making unique use of Phantasm CS Publisher’s advanced Ink Coverage tool which caters for all object types, including compound paths, editable text, groups and even images!
Following a long-running thread on the Adobe Illustrator forum [click here to read], it emerged that there are different methods to measure the area of a vector path within Illustrator. It was interesting to see that each approach was different – and free – and included a plugin and a hidden window within Illustrator intended for debugging by the development team. Each of the two methods has it own advantages, but both have the same disadvantage; they can only provide a result for simple paths – not compound paths, clipped paths, etc.
In this tip, we’ll have a look at both the previously-disclosed methods plus a third option making unique use of Phantasm CS Publisher’s advanced Ink Coverage tool which caters for all object types, including compound paths, editable text, groups and even images!
Non mentioning is rarely served by mentioning, as may be seen from the Robe tale.