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

How to sort objects alphabetically (inside of a layer)?

New Here ,
Sep 23, 2014 Sep 23, 2014

Copy link to clipboard

Copied

How to sort objects alphabetically (inside of a layer) on layer list?

I have already tried scripts for Layer sorting. They work indeed for the layers, but not the objects themselves packed inside.

TOPICS
Scripting

Views

21.8K

Translate

Translate

Report

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

correct answers 1 Correct answer

Community Beginner , Sep 23, 2015 Sep 23, 2015

 

// sort layers and sublayers by Jung K Kwon
// https://community.adobe.com/t5/illustrator-discussions/how-to-sort-objects-alphabetically-inside-of-a-layer/m-p/13462829#M349907

//#target "Illustrator"
var doc = app.activeDocument;
var Top_all_layers = doc.layers;
Arrange_Layers(doc, Top_all_layers);
redraw();

function Arrange_Layers(where, T_Layers_OBJ) {
    var temp_L_names = new Array();
    for (var i = 0; i < T_Layers_OBJ.length; i++) {
        temp_L_names.push(T_Layers_OBJ[i].name);
  
...

Votes

Translate

Translate
Adobe
Community Beginner ,
May 22, 2023 May 22, 2023

Copy link to clipboard

Copied

I just tried copying Jung K Kwon's script today and I am getting this error.  Is there a fix?  

Error.JPG

Sorry for the duplicate entry ... I'm a forum newbie and I didn't know how to insert an image in the original post.

Votes

Translate

Translate

Report

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 ,
May 22, 2023 May 22, 2023

Copy link to clipboard

Copied

copy Jung K Kwon script again, I just fixed a missing index, it should work now.

Votes

Translate

Translate

Report

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 Beginner ,
May 31, 2023 May 31, 2023

Copy link to clipboard

Copied

The updated from May 22, 2023 worked perfectly!  Thank you @CarlosCanto !

Votes

Translate

Translate

Report

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
New Here ,
Jan 09, 2024 Jan 09, 2024

Copy link to clipboard

Copied

Dangit; not working for me. Have there been any changes? The only code I see to copy is the 2015 post, and it's just radio silence after I run it; no errors, but no change to the layers. 

 

 

Votes

Translate

Translate

Report

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 ,
Jan 09, 2024 Jan 09, 2024

Copy link to clipboard

Copied

LATEST

the script from Sep 23, 2015 is the one that works

Votes

Translate

Translate

Report

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