Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Ordering objects by size

New Here ,
Feb 11, 2019 Feb 11, 2019

Is there any way or method to order objects by size?  I have a bunch of closed, filled shapes (random circles and squares) and I would like to order them by area.  If there isn't a way to do it just in illustrator, could I export them to another program and do it there and then return them to illustrator?

TOPICS
Scripting
1.6K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe
Adobe Employee ,
Feb 12, 2019 Feb 12, 2019

Hi Amir,

I am afraid right now there no option to do this in Illustrator apart from doing it manually. You may raise this feature request here: Adobe Illustrator Feedback. This is the best way of communicating with the Engineering and Product Management teams regarding issues and suggestions so they can be implemented in future releases.

Regards,

Srishti

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 12, 2019 Feb 12, 2019

Amir,

I believe there is a script for it.

Maybe Carlos or Theunis sees this soon, but in any case you may also ask in the Scripting forum,

Illustrator Scripting

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Feb 13, 2019 Feb 13, 2019

As Jacob said it could be possible through Scripts, I am moving this discussion to Illustrator Scripting

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Mentor ,
Feb 13, 2019 Feb 13, 2019

when you say "order", what do you mean? stacking order like in the layers panel? arranged from left to right or top to bottom?

i'll assume the first option, but let me know if i'm wrong. here's some pseudocode. not necessarily the best way. but it is one way.

run script

var items = [selected items or all children of a layer or layers.. basically the items you want to sort by size]

var sortedItems = []; //empty array for storing items sorted by size

var largest;

while items.length

     largest = items[0];

     for each item, starting at 1

          if current item is larger than largest

               set largest to current item

    

     sortedItems.push(current item);

     splice current item from items array

for each item in sortedItems

     current item: bring to front

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 13, 2019 Feb 13, 2019

Hi williama,

unfortunately, this scenario will presumably only works with simple closed paths (no compound path or clipped paths or or or …).

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Mentor ,
Feb 13, 2019 Feb 13, 2019

compoundPathItems, groupItems, textFrames etc all still have width and height properties. In the event of a clipping mask, you just need to isolate the top level path that has clipped = true and then use the dimensions of that path to determine the size of the whole clipping mask.

I'm using this exact same method of sorting objects in production right now.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 13, 2019 Feb 13, 2019

I afraid, the width and height are not of interest.

amirwerth​ wrote

… and I would like to order them by area.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Mentor ,
Feb 13, 2019 Feb 13, 2019

my apologies. i mis-read the post.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 13, 2019 Feb 13, 2019

https://forums.adobe.com/people/pixxxel+schubser  wrote

Hi williama,

unfortunately, this scenario will presumably only works with simple closed paths (no compound path or clipped paths or or or …).

yeah but the OP said

"I have a bunch of closed, filled shapes (random circles and squares)"

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Mentor ,
Feb 14, 2019 Feb 14, 2019

my apologies. i misread the post again.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 14, 2019 Feb 14, 2019

that was a reply to pixxxel

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Mentor ,
Feb 14, 2019 Feb 14, 2019
LATEST

i know. but i conceded to pixxxel's point because i again didn't read the post properly.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines