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
}

Tags: Illustrator

Similar Questions

  • How can I add a layer into a pdf file?

    How can I add a layer in a PDF file in Acrobat Pro XI?

    Hi Patrick,

    Please see this KB document for help Acrobat help. PDF layer

    Kind regards

    Nicos

  • How can I convert multiple files into a single PDF?

    I need to convert a single file PDF 3 pages of a contract.  How can I do this?

    Hi millionaire Blackburn.

    I checked your account - looks like you have a subscription Pack PDF Adobe, so that's great!

    1. Sign in to your account at https://cloud.acrobat.com/combinepdf using your Adobe ID and password.
    2. Click on the selected files to be combined.
    3. Select the files you want to combine into a single PDF.
    4. (Optional) Drag the thumbnails of files in the order you want that individual to combine files.
    5. Click on combine.

    Please let us know how it goes!

    Best,

    Sara

  • How can I convert a layer to Photoshop CS6 in HTML?

    I saw using the Creative Photoshop CS6 of cloud, you can right click on a layer and it will give a menu item to turn the layer in HTML. I don't see this option in my Photoshop Creative Cloud CS6 program. Any suggestions?

    This feature will be available for you on June 17, when Photoshop CC launches with the rest of the new CC applications.

    Sorry to get you all excited about these new features, only to leave you hanging with a long months of waiting.

  • How can I convert videodisplay time into a readable format?

    Hey guys... so I have a video screen that plays... and I need to understand how to format the currentTime and duration in a readable format


    for example: I need to see somehting like this '06:20:30 ' where 06 is hours, 20 is minits and is 30 seconds...

    any ideas?

    any help would be greatly appretiated!

    the code I have is:

    <VideoPlayerSkin>
         <s:VideoDisplay id="videoDisplay" autoPlay="false" width="544" height="306" />
         <s:Group>
         <s:ScrubBar id="scrubBar" liveDragging="true" width="556" left="-6" top="-5" />
         </s:Group>
         <s:Group>
         <s:Label text="{videoDisplay.currentTime} / " top="-277" left="180" />
         <s:Label text="{videoDisplay.duration}" top="-277" left="200" />
         </s:Group>
    </VideoPlayerSkin>
    

    Thanks in advance a ton!

    Hey here's an extract of my code that takes a second value and changes to a days hours minutes seconds format:

    public static void formateDate(totalSeconds:int):void

    {

    var days: int = int(totalSeconds / 86400);
    var hours: int int(totalSeconds / 3600) =-(jours * 24);
    var minutes: int = int(totalSeconds / 60)-(jours * 1440)-(heures * 60).
    var seconds: int = totalSeconds % 60;

    trace(hours+":"+minutes+":"+seconds);

    ...

    After that you can chain however you only need them a piece, but I hope that you can find not pointing in the right direction.

  • BlackBerry Smartphones how can I convert save the file into something readable!

    Using the Desktop Manager that I created a .ipd backup file.

    Now... How can I convert these data into something I can easily recognize?

    Oops - I forgot that the app... JSanders thanks!

  • How can you convert a PDF to multiple pages of a multipage TIFF file, or is it possible to make a multipage TIFF file?

    I have a PDF file with multiple pages and need to convert it to TIFF. How can I convert the PDF into a multiple page TIFF file, or you can make a multipage TIFF file?

    I have Adobe Acrobat 7.0 Pro

    Thank you

    That is right. You may be able to use PhotoShop or even possibly IrfanView for such an operation.

  • When I download programs from the internet, they appear just in the form of collections of files TextEditor. How can I convert them into a program.

    When I download programs from the internet, they appear just in the form of collections of files TextEditor. How can I convert them into a program.

    What kind of programs? When you download from? How do download you them?

  • If my word document is Ko 106480 how can I convert it into a PDF file if it exceeds the limit of 100 MB

    If my word document is 106 480 Ko how can I convert it into a PDF file if it exceeds the limit of 100 MB

    Get Acrobat and you won't have these limitations.

  • I need to convert PDF into Word Document, so it can be edited. But grateful text options do not have the language I need. How can I convert the file in the desired direction of my language?

    I need to convert PDF into Word Document, so it can be edited. But grateful text options do not have the language I need. How can I convert the file in the desired direction of my language?

    The Acrobat application provides no ability to language translation.
    If you locate the language for the applications from the OS, MS Office, Acrobat, etc. to the desired language try again.
    Alternative: transfer a copy of the content in a web site based in PTE (Bing or Google offers a free service).
    Transfer the output in a word-processing program that is localized in the appropriate language.
    Perform the cleaning.

    Be well...

  • How can I convert a page typed into an editable text file

    How can I convert a page typed in an edible text file? I have a 50 page typed (on a typewriter ;-) document I want to convert (scan?) in a format so that I can then open the file in a text editing application (Word?) and edit.

    How is the most effective (and least expensive) way to do it?

    Thank you

    HAL

    < re-titled by host >

    "Edible text file?" You hear as he print on rice paper, so you can serve it up like at dinner side dish? You want someone to eat their words

    I think that the last two multifunction printers, I bought came with some kind of OCR characters (OCR) software as part of the sweeping package.  I guess that's not the greatest.

  • How can I convert an incoming call read only an attachment so I can change it?

    How can I convert an incoming call reads only attachment so that I can change it? Save in Word does not it, and find research peut t.

    So, the problem seems to be that attachments are stored as files read-only by Thunderbird and an application it can open without editing privileges, so you cannot change the. Read-only mode was chosen because these files are kept in a temporary location. For example, if you modify and save the back, they are deleted when Thunderbird is closed, so losing your changes. The idea is to force to save you to a different location. You should be able to do it, then open it from that location with full editing capabilities.

    For a permanent change in this behavior, go in the [tools >] Options > advanced > general tab and click on Config Editor there. After you confirm the warning, copy - paste browser.helperApps.deleteTempFileOnExit into the search bar and switch false to true by double clicking on it. Now, saved attachments are created with read/write permissions, but is more removed when Thunderbird is closed (i.e., stored in % AppData%\Local\Temp).

  • How can I convert table 1 d in a 2D array.

    I have a table 1 d I want to get into an Excel template.  How can I convert a 2D table so I can enter Excel Table.vi easy?

    Be sure to check the correct operation. Solution-Marc adds another row of zeros and I don't know if this is desirable here. (See also)

  • How can I convert a wmv of media player in a jpg file so that I can enhanse the photo

    How can I convert a wmv of media player in a jpg file so that I can enhanse the photo.

    can I make the brighter picture of media player photo.

    WMV is a video file... JPG is a file photo...

    If you want to brighten up the. WMV video file... import into
    Movie Maker / slide on the timeline and add brightness
    Increase the effect in the file... you can add up to 6 instances
    an effect.

    Then save your changes as follows:

    To save in a .wmv movie file...
    Type of... CTRL + P (or go to...) File / save movie file)
    to open the wizard movie recording.
    Choose... My computer.
    Next /.
    Enter a name and a location.
    Next /.
    ICT... "Best quality for my computer.
    Next /.
    Wait while the movie is saved.
    Finishing...

  • How can I convert ti audio MP3 WMA WAV

    original title: how DO I CONVERT MP3 AUDIO BACK to WMA or WAV.

    HOW CAN I CONVERT AUDIO IN WMA OR WAV MP3.  I WANT TO MAKE A CD FOR A PLAYER OVER AGE THAT DOES NOT SUPPORT THE MP3.

    THANK YOU MR BUDDY

    HOW CAN I CONVERT AUDIO IN WMA OR WAV MP3.  I WANT TO MAKE A CD FOR A PLAYER OVER AGE THAT DOES NOT SUPPORT THE MP3.

    THANK YOU MR BUDDY

    ========================================
    I think that if you burn an Audio CD (music)...
    the CD player in question must be compatible.

    The following article explains how to burn Audio
    CD in Windows Media Player.

    Windows 7 - burn a CD or DVD in Windows Media Player
    http://Windows.Microsoft.com/en-us/Windows7/burn-a-CD-or-DVD-in-Windows-Media-Player

    If you want to convert MP3 files to WMA
    or WAV format... read more...

    There are to many converters available on the net...
    Some are free - some details... the following freeware
    is but one example. :

    (FWIW... it's always a good idea to create a system)
    Restore point before installing software or updates)

    Freemake - Free Audio Converter
    http://www.Freemake.com/free_audio_converter/
    (Windows XP / Vista / 7)
    (* Read * all * the installation screens... it)
    may be a few items you want to unmark *)

    When you have installed Freemake... Open Freemake
    and drag and drop your files music on the main screen.

    Or... Click left on the Audio button, then navigate to the
    your audio files are saved in the folder.

    Select (highlight) the files you want to import into
    Freemake and left, click on the button 'open '.

    When your music files are imported into Freemake,
    On the left, click on the WMA icon at the bottom of the screen.

    The "Output settings" screen opens.  Choose
    ' Save in ' file so you can find the converted files.

    On the left, click the "Convert" button and the files must be
    converted very quickly.

    That should do it...

Maybe you are looking for

  • General fresh Firefox by redirect

    Hello I have a site that does multiple redirects. I have the network and the cool Server General for them - but they don't add to the user perceives the measurement time. We know what is the overload caused by the firefox for a redirect. I hope that

  • Satellite A110-275: movies on DVD - R do not work

    Hi everyone I had a problem. A couple of weeks, I installed Vista on my laptop, to find every time that I burned a DVD movie, it would not properly play in my DVD player. So I thought it was a problem of Vista compatibility. So I reinstalled Windows

  • Question about upgrade CPU on Portege M100

    On my Portege M100.Can I switch my Banias 1.2 Ghz chip to a Dothan 2.0 Ghz chip now that BIOS 1.5 supports Dothan?

  • unlock nokia N97 mini

    I need help to unlock my n97 mini, the IMEI number is 357985032151392 his only phone locked and Ive forgot the code, can someone help me please?

  • How to show the background application

    Hello I want to follow an alert in my application when the application is in the background. I tried with this code: -. Alert: AlertDialog var = new AlertDialog(); Alert.title = "alert"; Alert.message = 'Notification '. alert.addButton ("Cancel"); al