How to convert all layer groups

Hi all

I have a huge file with several groups containing each mutiple subgroups containing... you guessed it, many other groups.

I need to convert every single file group to a layer and follow the same order (groups, subgroups and so on) to make this design usable and editable.

Unfortunately, I have zero skills in programming or JS.

Has anyone faced the same problem? I'm looking for a script which create layers, name them and transfer the content automatically into the appropriate layer. It would be just w-a-a-a-a-y-y-y long do it manually because the file contains more 20 000 forms (most I have several other files that I need to convert the same way).

Any help would be much appreciated!

Thank you

OK, give it a try. It works best if you start with only 1 layer and this layer has only groups within higher level.

#target illustrator-19
function test(){
    var doc = app.activeDocument;
    var originalLayer = doc.layers[0];
    var newLayer, thisGroup, thisContent;
    for(var i=originalLayer.groupItems.length - 1; i > -1; i--){
        thisGroup = originalLayer.groupItems[i];
        newLayer = doc.layers.add();
        newLayer.name = thisGroup.name;
        for(var j=thisGroup.pageItems.length - 1; j > -1; j--){
            thisContent = thisGroup.pageItems[j];
            thisContent.move(newLayer, ElementPlacement.PLACEATBEGINNING);
        };
    };
    app.redraw();
    if(originalLayer.pageItems.length == 0){
        originalLayer.remove();
    }
}

test();

Tags: Illustrator

Similar Questions

  • How to convert a layer back to the text "T? He is currently uneditable (how did that happen?).

    How to convert a layer back to the text "T? He is currently uneditable and I want to change the font (also, how what happened?).

    According to your layers panel. The top layer is a text layer years the second layer is a raster layer. A raster layer once the case has been closed, cannot be cancelled. It will have to be re-created. If for some reason, you left the file open, then it is perhaps possible to cancel it, because it would show in the history stack. But by default that stack is set to 20 States, to more than 20 he would push the battery.

    I think that you have to bite the bullet and redo this layer.

  • How to convert * all * tables of text in a document?

    Version: Indesign CS 5.5

    I have a massive document that was given to me after be imported into Word, and the person who has imported, it did not convert tables to text (or they tried and it did not work, be it, I have a huge amount of tables that must be not filed).

    I am responsible for the document formatting, and the formatting requirements are to convert all tables in the text document. I was able to batch-process other formatted in the document with the help of find + replace, but I can't seem to find a way to search for all instances of a table in the document and convert all the table set in shape to the text. I can find every table in the search/replace tool using < 0016 >, but I have no idea how, and then delete the table set shaped with the change function.

    I have no text special requirements (standard; tabs for columns and new paragraphs for the lines) and all tables should be converted, regardless of their formatting or content, so it's fairly simple formatting.

    There must be SOME way tot automate this process, it seems incredibly Loïc having to select each table individually and go up to the menu to select "convert table to text... '. ». Any idea is appreciated.

    Click on the text cursor in your text running, and then run this Javascript. WARNING: fully typed memory!

    App.Selection [0].parentStory.tables.everyItem () .convertToText ();

  • How to convert all anchors in Illustrator for the corners?

    How can I convert all anchors in Illustrator for the corners? 'Convert anchor points selected on the corner' does not work or I couldn't use it properly.

    I use the direct Selection tool in the half of the points of the object and click 'CSAPC' - and it does nothing.

    is one knows how to do this?

    To run the script, see here:

    http://help.Adobe.com/en_US/Illustrator/CS/using/WS714a382cdf7d304e7e07d0100196cbc5f-62a3a .html

    The scripts folder is in the folder presets, located in the program folder.

  • How to remove all the groups from shared Services?

    Hi, how can I remove all the native directory of Shared Services in the form of groups?

    Select the groups under native, select Show all, press shift or control, you can select groups, once the groups are selected, right click on and select Remove.

    Thank you

    ~ KKT ~.

  • CP9 why/how to convert all my conditional actions standard actions?

    I have a CP8 project I've been working for a few months now and finally upgraded to CP9. I realized immediately that one of my intelligent form buttons using rollover States had not the rollover State postponed from 8 to 9, so I saved a copy of the file in CP9 for I can have both versions open by-side if I could go back in the file CP8 to see how configure the States of turning so I could rebuild them at 9. This really isn't a big deal, but I find that each of my Advanced actions have been converted to a standard action.

    This is a preview of action in CP8:

    Clipboard03.jpg

    And it is so, it now appears in the CP9

    Clipboard05.jpg

    Everything else in the file, except buttons of smart shape with bearing States, is intact, as I can tell. What I am confused by, that's why/how each conditional action has been converted into a standard action. What I can see, everything inside the IF and ELSE statements have been purged and all under the Actions across all decisions have been combined together, as well as any action that refers to a variable being disconnected from the variable.

    Fortunately, I did a lot of work on the file so I can re - open and re-save the file CP8 again, but it's just a weird super bug.

    This is a bug known, already mentioned in this forum, just after the liberation. A patch is promised as soon as POSSIBLE to fix.

    Solution: do a little editing of the conditional action, so that you can use the update action button. When the backup actions are conditional. BTW, they are not converted to an advanced action level but to a shared standard action.

  • Transform all layer groups

    Hey guys,.

    I have an action implemented to do it for me, but it takes too much time. If I said 5 groups, I can select a group and press ctrl + shift + e to merge into a layer. My action is put in place for this to all groups. But is it possible to automatically turn on all layers to have groups to save?

    Thanks in advance!

    Considering that a document can contain a variable number of groups with names of variables a Scripting solution would seem the best approach.

    You could ask for help at the wire to

    Photoshop scripts

    (edited)

  • How accidentally convert all my images to 8 bits?

    Hello

    Five minutes ago, I checked my image in Camera Raw before import into Adobe Photoshop CS6 wasn't in 16-bit mode.

    Immediately after that I imported into Photoshop and it became a document .psd, I checked once more that he was always in 16-bit mode.

    Then I created a duplicate layer, selected the sky and created a mask layer from this selection.

    Not much.

    NOW I SEE from below, I am in 8-bit mode.

    Why is this?

    It is true that ANY MASK I create forces the entire image in 8-bit mode?

    Thank you!

    Screen shot 2013-01-02 at 12.14.32 PM.png

    The documents should never spontaneously of course change the bit depth.

    Opening a Camera Raw image in Photoshop, the title of the document should not end in '.psd' until a backup (in PSD format). Have you made the steps other than the ones you have described?

    Your thread title says "all my images. Do you mean that you have had many 16 - bit documents open in Photoshop and all except one of the inactive tab in your screenshot became mysteriously 8-bit?

    Look in the history panel after a doc past from 16 bits to 8 bits. There is an element named "8-bit/channel"?

  • How to convert all white-&gt; alpha for the vector image?

    I'm trying to make a new font. Currently I have saved all the png-> vector images that I work with as. The files HAVE, so I can import them into my program of police later, and they open fine in illustrator. The problem is, usually, I save my vector images with a white background instead of alpha. Now, I need to replace the white by alpha, but I can't find a wand helping in illustrator . Any help?

    ICRIN,

    In terms of Illustrator, you talk about giberish.

    Indicate EXACTLY step by step and WHAT you do and what you want to get the results. There is no 'alpha channel' in Illustrator. you are dealing with objects, not pixels.

    JET

  • How can I convert a layer into a group?

    Hello

    I have several layers with sublayers in it. The problem: all the layers (containing sublayers) have been open in the pallet layer on opening the document.

    How can I convert a layer into a group preserving the name? Is there a (semi) approach - automatic to convert all sublayers in groups?

    Thank you

    Konrad

    OK, writing a script was not so difficult as expected.

    So, here's a javascript script to convert a layer into a group:

    /**********************************************************
    
    LayerToGroup.jsx
    
    by Konrad Mühler 2013-06-03
    
    DESCRIPTION
    
    Converts an (Sub)layer into a simple group
    
    **********************************************************/
    
    var currentDocument = app.activeDocument; // get current document
    var currentLayer = currentDocument.activeLayer; // get current layer
    
    var newGroup = currentLayer.parent.groupItems.add(); //add new group into the parrents of the current layer
    newGroup.name = currentLayer.name; //set the same name as for the layer
    
    for (i=currentLayer.pageItems.length-1; i>=0; i--) // loop thru all items
    {
        var singleItem = currentLayer.pageItems[i]; // get item
        singleItem.move(newGroup,ElementPlacement.PLACEATBEGINNING); // move item to new group
    }
    
  • How to get the current layer type (text, art, layer group, etc.).

    Hi, I'm traveling on all layers using layerIndex. I can get current name later following the path. char * NomCouche = new char [100]; Int32 len = 100; PIUGetInfoByIndex (layerIndex, classLayer, keyName, NomCouche and len); I tried to use the keyType and sound in the same way, but I'm not able to get the type of the layer directly. Why? Also, I found a similar discussion, check the layer is SectionStart, SectionEnd or SectionContent. Get plugin C++ layer groups if the layer is a 'SectionContent', how I have in addition to check its type (textlater, adjustmentlayer, artlayer, ect)?

    Ok

    Later, I noticed that the value of a layer type is int32.

    Int32 layertype = 0;
    DescriptorTypeID runlayertypeKey = 0;
    sPSActionControl-> StringIDToTypeID ("layerKind", & runlayertypeKey);
    error = PIUGetInfoByIndex (layerIndex, classLayer, runlayertypeKey, & layertype, NULL);
  • How to convert layers groups keeping the names of groups

    Hello

    I have a file with 90 illustrations on 90 pages. Unfortunately, the illustrations are located at 90 groups but in a single layer. However, the groups are named. I would now like to convert the named groups 90 layered keeping their names in order to export each single layer in PNG files with their corresponding subsequently layer name.

    Any ideas anyone?

    Thanks for your help, regards,.

    Ralf,

    Cologne

    AppleScript = mac only

    VBScript = pc only

    JavaScript = cross-platform

    Here is a sample in JS... it is the first part, it moves the layer groups

    var idoc = app.activeDocument; // get active document
    var ilayer = idoc.activeLayer; // get active layer
    
    for (i=ilayer.groupItems.length-1; i>=0; i--) // loop thru all groups backwards
         {
              var igroup = ilayer.groupItems[i]; // get group
              var newLayer = idoc.layers.add(); // add new layer
              newLayer.name = igroup.name; // rename layer same as group
              igroup.move(newLayer,ElementPlacement.PLACEATEND); // move group to new layer
         }
    
  • How to back up or restore all my groups of tabs (preferably 1 operation)?

    I would like to save all my groups of tabs, both for purposes of backup, but also for migration to another computer. How can I do this in a single operation?

    The same consideration would apply to all the groups tab restore from a previously saved session.

    Eric

    The app tabs and tab (Panorama) groups are stored in session data in the sessionstore.js file in the Firefox profile folder

    You can make a backup copy of this file.

    Help > troubleshooting information > profile directory: opens showing the file

  • How to get all the contacts in the group through the loop

    Hello world

    I know the name of grop, the address book,.

    How to loop all of the contacts in the Group and count them?

    I find the solution.

    Use BlackBerryContactGroup.getContact ();

  • Wikibrowser installed on my computer and converted all the docs in wiki. How to convert to PDF

    Wikibrowser installed on my computer and converted all my PDF docs in Wiki format. I want to delete my computer Wikibrowser, but do need to be sure I will not lose access to the documents. How can I convert documents to PDF?

    OK, the documents are not actually changed, not at all.

    What happens is that under Windows, you can choose which application opens a type of file when you double-click. (You can do yourself by right click, open with...). When you choose the application, all files take this icon. The files don't change, just the icon. In this case, the Wikibrowser tells Windows that it will open all your PDF documents, so changed the icon.

    But get rid of this malware as soon as you can. One of my friends had this and other things and kept just malware download and install more malware. In the end, she had something more than 4,000 to get rid of!

Maybe you are looking for

  • I can't upgrade to 7,7,7 it shows always 7.7.3 is up-to-date

    I use extreme AC version of the airport, I can't update 7.7.7 pls help me

  • missing Skype history

    while I was asleep last night my computer restarted itself, as it often does... when I woke up my avatar and mood have disappeared, the option "do not disturb", I am using has been reset to 'online' and my chat history missing for everything except 2

  • Coregen MACC

    Hi all, I think this may sound obvious, but can we see why MACC Coregen does not work for me. Cordially, Steve.

  • Software driver for Acer ES1-511-C1UU for Windows 7 64 bit

    Hello I bought an Acer Aspire E 15, ES1-511-C1UU a few weeks before with version 8.1 of Windows authentic. Now that I'm not very comfortable with this version of the OS, I want to convert my lpatop in the version of operating system Windows 7. So ple

  • Help to set up an email alert Notification

    Hello-I've recently upgraded to vRealize operations 6.1 and have problems to work properly for e-mail notification alerts.  At the beginning I wanted to just receive email notification alerts when a certain group of machines in a VM folder have been