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

All Group to Ungroup Script

New Here ,
Jun 30, 2009 Jun 30, 2009

Copy link to clipboard

Copied

logo.jpg

Download Link

http://www.cyworld.com/be2u/2801831

Feature

This Script  is Can be easily  ungrouping to all group items in the Document.

if find Bugs or Error, contact to me plz.

License type

Freeware

Author

Nokcha

Author Contact

netbluew@gmail.com

Author website

http://be2u.tistory.com

http://www.cyworld.com/be2u

Date published

june 30, 2009

Compatible product

Illustrator

TOPICS
Scripting

Views

13.5K

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
Adobe
Community Beginner ,
Mar 26, 2018 Mar 26, 2018

Copy link to clipboard

Copied

Hi

When calling the ungroup script with all top level layers of a document, those layers that have only one sublayer (and no immediate pageItems) will be removed.

To preserve top layers we adapted the getChildAll function to pick up layers as well:

function getChildAll(obj)

{

    var childsArr = new Array();

    for(var i=0;i<obj.pageItems.length;i++)childsArr.push(obj.pageItems);

    if(obj.layers){

        //  Get layers as well.

        for(var i=0;i<obj.layers.length;i++)childsArr.push(obj.layers);

    }

    return childsArr;

}

and in the main script we let layers make a call back to ungroup too, just as GroupItems do:

if(elements.typename=="GroupItem" || elements.typename=="Layer")ungroup(elements);

Best regards,

Andreas Jansson

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
Explorer ,
Jun 12, 2024 Jun 12, 2024

Copy link to clipboard

Copied

LATEST

Thank U for the script. I spent 6 hours to combine how to do it using while loop, but obj.groupItems.length doesn't refresh (obj = selected group)

Regards

Mateusz

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