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.
// 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);
...
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?
Sorry for the duplicate entry ... I'm a forum newbie and I didn't know how to insert an image in the original post.
Copy link to clipboard
Copied
copy Jung K Kwon script again, I just fixed a missing index, it should work now.
Copy link to clipboard
Copied
The updated from May 22, 2023 worked perfectly! Thank you @CarlosCanto !
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.
Copy link to clipboard
Copied
the script from Sep 23, 2015 is the one that works