Trying to convert all sublayers of my design (with or without children) into a group on its own. You can check on my screens what i have to what i need to obtain.

What i have

enter image description here

What i need

enter image description here

Here is the code i currently have but is not working. I've tried to select each layer as standalone and then group each one:

var docRef = app.activeDocument;


    function groupLayers(doc) {
        var currentLayer=docRef.layers[i];  
  • you do understand that yuor script does not do anything smart as you dont update yuour selection. Anyway this is not a particulary general problem and you allready asked the question once. – joojaa Dec 17 '18 at 16:02
  • my previous question was more complex with 3 level grouping. i've changed my method so i would only need to work 2 level groups. Why should this be a general problem in order for me to ask for help? Thanks anyway for the selection hint. Going to improve it. – graphic.ninja Dec 18 '18 at 14:19
  • It lowers the number of possible people that can answer your question and lowers number of people who would upvote the answer. In reality your problem is the way you ask your question and your history. In my opinnion you should be able to do this based on your previous answers. Anyway your problem is not hard, just disinteresting. – joojaa Dec 18 '18 at 14:50
  • You can generally make disintetesting posts interesting by being more revealing about your process. This way its more balanced exhange we readers get something from you as well. Also ot allows us to come with more answers. The less something looks like a job assignment the better. – joojaa Dec 18 '18 at 15:11
  • i do understand what you mean. actually my problem is so direct because the script im working runs about 15 actions to check the artwork properties and remove unwanted stuff before the export and this is the last step. honestely this is not my expertise so i was trying to use existing scripts that changes the layer names one by one to work similar but making it group one by one that i thought would be very similar but not being able to make it work. Im still working on this and thanks for the insight on the lack of answers im getting on my postings. – graphic.ninja Dec 18 '18 at 15:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.