Copy link to clipboard
Copied
Copy link to clipboard
Copied
Im dont think its as easy as to subtract or add to calculate certain sub-items. Thing is, they can also overlap half, but there is no way to find out how much then. Perhaps better method would be duplicate the object and expand all. Then do area check.
Im running in an issue where a live PathFinder items, one is created by holding alt when ie subtracting 2 items. The object because a pluginItem, these have hardly anything in script in terms of parameters of arguments.
EDIT
I have done some testing, lots of it, and i believe i have a working version now for also pluginItems, so items which are created from the pathfinder panel when alt is pressed when clicking ie subtract. Ive also found a workaround to get compoundpathitem with sub-items. I simply duplicate that object and then use trim, they i loop over all the parts. That way we dont have the issue with the polarity. Because half overlapping sub items are now trimmed and thus result in a proper path item
Copy link to clipboard
Copied
This discussion rank pretty high if you google calculate area in illustrator, so I thought I share what I found. I could not get the scripts etc posted earlier to work (maybe to no surprise since it's 16 years old) but since Illustrator still does not calculate area on it's own in 2023, I'm guessing there might be more people looking for a solution.
I found this, which works great (on a mac at least), works on single, multiple and combined shapes – very useful, and free: https://gist.github.com/bryanbuchanan/11387501
Copy link to clipboard
Copied
Ive worked on that scripted and added a dialog and more functions. You can find it here https://github.com/schroef/Illustrator-Scripts/blob/master/GetShapeArea-dialog.jsx
I can can show multiple digits, 2 different units and can also show real world size. Currently still only m2
Ive also solved issues with pluginitemsshape and compoundshape items
Though there is one issue with very complex shapes. But there is a solution, if we group multiple compoundshape items first, then run trim function then the script