script batch rename/number of layers in Illustrator CS6

It is a script that I can use in Illustrator for batch rename all sublayers? I would also like to be able to add sequential numbers to each layer too. I saw an older post that contained a script to do this, but she seemed outdated and does not work on CS6. Here is the reference, maybe someone can modify it to work for CS6?

START THE SCRIPT.

docRef = app.activeDocument;
topLayers = docRef.layers;
for (i = 0; i < topLayers.length; i ++) {}
var currLayer = topLayers [i];
var newNum = i + 1;
currLayer.name = "Layer" + newNum;
Sublayers = topLayers [i] intact;
for (j = 0; j < subLayers.length; j ++) {}
var currSubLayer = sublayer [j];
var newSubNum = j + 1;
currSubLayer.name = "Layer" + newNum + "." ' + newSubNum;
subSubLayers = intact sublayer [j];
for (k = 0; k < subSubLayers.length; k ++) {}
var currSubSubLayer = subSubLayers [k];
var newSubSubNum = k + 1;
currSubSubLayer.name = "Layer" + newNum + "." "' + newSubNum + '. ' + newSubSubNum;
}
}
}

END SCRIPT.

So those who were not yet sleeping, but they looked as if they were layers? I thought they were layers because it does not look as if they were inside any layer... but he could simply have the screenshot?  But I were considered and rejected this possibility when you first look at it.

To start at 0, where it says var newNum = i + 1, just change var newNum = i;

Tags: Illustrator

Similar Questions

  • Script to rename the PSD layers

    Hello

    I have a lot of documents PSD and rename layers.

    Layer names are like 'natural environment - natural environment - 103 89' and I want to the rename 'environment_89, environment_103' etc. in several layers.

    I'm looking for a script for this.

    Can someone help me?

    Hello!

    Try this:

    CalcChangeNom.jsx

    var doc = app.activeDocument;

    If (doc.layers.length > 1)

    {

    I have = doc.layers.length

    for (x = 1; x<= i;="">

    {

    var calqueSel = doc.layers [i - x];

    calqueSelNom = calqueSel.name;

    Result = calqueSelNom.split("");

    If (result [0] == "natural" & result [1] == 'environment')

    {

    calqueSel.name = "environment_" + result [3];

    }

    }

    }

  • Rename the selected layers in batch

    I am trying to find a script to rename/renumber lot, a group of selected layers.

    So far, I was able to find a script that renames each single layer in a Photoshop (overkill) document. Or there is the trick to rename CS6 (too slow) tab.

    I'm routintely export PSD in Illustrator for use in After Effects. But in Photoshop, I'll take a few hundreds of layers named < path > or < path > + < path > or < group >. Change of name by hand, it's out of the question. But I don't want to rename all the layers of the same.

    Any suggestions?

    I wrote to you here...

    names.html http://www.retouchpro.com/forums/Photoshop-Scripting/23234-script-Find-Replace-Text-Layer-

  • Script Help: The names of layers from the Excel data

    Hello!

    I'm a noob script and have tried to learn, but unfortunately I just haven't the time. Projects at work keep me in the Bay. In any case, here's my scenario and I hope someone can guide me.

    I want a script that would look at a database (XML, CSV, excel or anything that works) and create separate layers in illustrator based on the data.

    Example: description and part number comes from a database. Name of the Illustrator layer is what I want the automation script. The reason for this request is a 200 point that I don't want to retype.

    Part numberDescriptionName of the Illustrator layer
    33456Point 133456_Item 1
    33457Point 233457_Item 2
    33458Point 333458_Item 3
    33459Point 433459_Item 4
    33460Point 533460_Item 5
    33461Item 633461_Item 6
    33462Point 733462_Item 7
    33463Item 833463_Item 8

    After that, I have all my items, with correct layer names, I export each layer as a separate PDF file. The name of the export file would be identical to the layer name with "_1up" appended to the end. For example, 33456_Item 1_1up.ai.

    I would have a separate illustrator file that contains all the same name of the layer as above and then I place the exported file, he respected the layer. This is where the script of another would be great. Is it possible to make a script that will place an image on a layer that has similar naming structures (the only differences would be the name of the layer would not "_1up")?

    I hope this makes sense and I know that I ask a lot. I thank very you much in advance!

    still not sure why export you all the layers to separate the files only to place them all back again?

    but this will get your layers created.

    var line,lay,myLayers = [];
    var csvFile = File('e:/csv.csv');
    csvFile.open( 'r' );
    while(!csvFile.eof){
        line = csvFile.readln();
        line = line.replace(',','_');
        myLayers.push(line);
    }
    csvFile.close();
    var doc = app.activeDocument;
    for(var i = myLayers.length - 1; i > 0; i--){
        lay = doc.layers.add();
        lay.name = myLayers[i];
    }
    var oldLayer = doc.layers.getByName('Layer 1');
    oldLayer.remove();
    

    CSV should simply be:

    33456, point 1

    33457, point 2

    ...

  • Script to rename work with layer names plans

    I want to create a script to rename lots a number of work plans.

    -J' have 100 named layer.

    -J' have 100 work plans.

    -I would like to rename work plans to match the layer names.

    -Layers are organized in the same descent orderas work plans (ignoring the names real artboard *).

    -The plan of work in the foreground (1 in the list) would be renamed "Journal", the second plan of work would be renamed "typewriter", the third work plan would be renamed "books", etc..

    * in the example below, the artboard named 'Graphic Board 7' is actually the 6th work plan in the list.

    LayerNames-To-Artboards.png

    Any help would be wonderful.

    Hi sensibleworld, welcome to the forum.

    For your case, it should be fairly simple. The following excerpt from script bit renames work plans to match the corresponding layer names that you described in your first post above. It only works if the number of layers and work plans correspond to such indicated and talked about in your above description of requirements.

    if (app.documents.length == 0) {
        alert("No Open / Active Document Found");
    } else {
        var doc = app.activeDocument;
        if (doc.artboards.length == doc.layers.length && doc.layers.length == doc.artboards.length) {
            for (var i = 0, l = doc.artboards.length; i < l; i++) {
                var ab = doc.artboards[i];
                ab.name = doc.layers[i].name;
            }
            alert("Finished:\nRenaming of Artboards to match Layer names is complete");
        } else {
            alert("Opps: This wont work!\n The number of Layers and Artboards do not match");
        }
    }
    

    I hope that this is useful for your efforts and your requirements. Welcome back to the forum.

  • Bridge CC - batch - rename - by ascending by 2

    Hello.

    Well, I'm trying to rename the lot - my (double-sheets) PDF to send to the printer. Fellows need a special form of the name of the document: page number of the map left, right leaf page number, chapter name, version number of the catalog (for example, 122 - 123_sports_X2.pdf).

    Is it possible to automatically write the two numbers at the beginning of the name pages? Or maybe just to increase the index sequence of 2 values?

    Very well. No idea...?

    I've found a workaround. Maybe not the way easier, but faster than handtyping:

    -duplicate files

    -Rename starting with the first page in the batch number (eg. 004)

    -batch rename to new beginning with the first page number - 1 (003)

    -remove duplicates

    voila!

    I hope this helps someone!

  • PowerCLI script to rename csv vm

    Hello

    I need help to write a script to rename vm and change the network connection to the vlan correct, based on the input of a csv file.  To change only the display name of the virtual machine in vcenter (vmdk will be renamed set by perform a svmotion)

    CSV will look like this:

    OldName, newname, tobevlan

    VM1, tag - vm1, vlan4

    VM2, vm2 - tag, vlan7

    VM3, tag - vm3, vlan4

    I already use LucD script to import the virtual machine based on a csv file.  Now I need to add that part of the script.  I need to import a large number of place of vm on some data stores.  There are some virtual machines that do not need to be imported, so I use a csv file to import only needed her.  After the recording of the virtual machine, they all need to be renamed, and network connection must be changed.

    Thanks for your help.

    Kind regards

    Christophe

    You can try something like this

    ###############################################################################################################################
    # CSV file layout
    #
    # VMXPath,oldname,newname,vlan
    # "[ds] VM1/VM1.vmx",VM1,newVM1,net1
    # "[ds] VM2/VM2.vmx",VM2,newVM2,net2
    # "[ds] VM3/VM3.vmx",VM3,newVM3,net3
    # "[ds] VM4/VM4.vmx",VM4,newVM4,net4
    #
    ###############################################################################################################################
    $vms = Import-Csv D:\temp\import-vm.csv -UseCulture
    $targetVMX = $vms | Select -ExpandProperty VMXPath
    $Cluster = "CLUSTER_01" $Datastores = "*_DATASTORE" $VMFolder = "TESTFOLDER" $ResourcePool = "TestRP"$ESXHost = Get-Cluster $Cluster | Get-VMHost | Get-Random
    foreach($Datastore in Get-Datastore $Datastores) {
      # Search for .VMX Files in Datastore
      $ds = Get-Datastore -Name $Datastore | %{Get-View $_.Id}
      $SearchSpec = New-Object VMware.Vim.HostDatastoreBrowserSearchSpec  $SearchSpec.matchpattern = "*.vmx"  $dsBrowser = Get-View $ds.browser  $DatastorePath = "[" + $ds.Summary.Name + "]"
      # Find all .VMX file paths in Datastore, filtering out ones with .snapshot (Useful for NetApp NFS)
      $SearchResult = $dsBrowser.SearchDatastoreSubFolders($DatastorePath, $SearchSpec) | where {$_.FolderPath -notmatch ".snapshot"} | %{$_.FolderPath + ($_.File | select Path).Path}
    
      # Register all .vmx Files as VMs on the datastore
      foreach($VMXFile in $SearchResult) {
        if($targetVMX -contains $VMXFile){
          New-VM -VMFilePath $VMXFile -VMHost $ESXHost -Location $VMFolder -ResourcePool $ResourcePool -RunAsync    }
      }
    }
    
    foreach($vm in $vms){
      Get-VM $($vm.oldname) |
      Set-vm -name $($vm.newname) -confirm:$false |
      Get-NetworkAdapter |
      Set-NetworkAdapter -Networkname $($vm.vlan) -confirm:$false}
    
    
    
  • Batch rename, change of name after frame 99

    Hi, I put a folder in bridge to do a batch renaming and called the MILAN/SYRIA text and has to first number 00.BATCH-RENAME.png

    After frame 99 the name changed to a strange Adobe Bridge Batch rename Temp 10037

    CHANGE.png

    As you can see in the RAW Windows, the 99 and the next better.

    99:MILAN:SYRIA.png

    AFTER 99.png

    Photoshop do not open a name like that, he can not blame him.

    COULD -NOT -SAVE.png

    of course I strongly guess I should have given 3 digits in rename batch, and l'm looking for confirmation, and even if I'm here

    Why was my card the integer to the 0485 photos when a record I think takes as much as 9999, how you finish a folder if your card is full?

    I suppose that you change your card and you continue with the same folder? Sorry for the question of the camera couldn't keep, thank you dona

    I'm surprised that the name change has worked at all "/" should not be used because it is used as a file separator.

  • Bridge CC on Win7 64 problem with batch renaming.

    Subscribed only to the Cloud environment and download Bridge CC. Set up and saved a batch rename model ok, but the names of the selected files do not change in the same folder. The folder is located on a second disk, but I doubt that this would have caused a problem. I wonder if bridge CC must be connected in the cloud using it and if browser script security restrictions would cause a problem? No matter which illuminate my path?

    This anomaly occurred when a system has been implemented with two physical hard drives. Each was bootable, but it will take a tour in THE system BIOS before startup, which drive to boot from the value. Regardless of the car was chosen would then be called by the BIOS of the c:, the other being the D drive. So when Bridge CS3 disk 1 started as the C: drive it should have been not aware of the other side of the bridge on the D: drive now. If disk 2 with bridge CC has been started, it would then become the C: drive, making the drive 1 drive D:. Once more drive 2 bridge CC is not aware of the version of D: drive on disk 1.

    The original problem may have been caused during the installation of the bridge on the second disc, which could search all drives during the installation you are looking for install previous, not only the startup disk. To avoid this the second disc will need to be taken offline (dismounted) while the latest version of the bridge has been installed on the remaining disk. It's like having two drives C: containing all required files, but only have one mounted at the same time. However, changing the code of the road so there isn't that one C: drive can both be used together with the only designated as C: initializing. The other would just look like a data reader.

    This configuration has been a trial in the production of a fast recovery system in a hostile environment. Because this configuration is no longer in use, I will finish this original question because it is no longer relevant.

  • Batch rename files that have non-consecutive numbers?

    I have a folder with about 100 files of images that carry the non-consecutive numbers. Is there a way to rename them all to add something after the numbers (and before the file type extension) without changing the numbers?

    Example: If I select 111019.003.dng and 111019.007.dng, is a way to batch rename the 111019.003_tk.dng and 111019.007_tk.dng?

    Of course, simply batch renaming it w / a sequence number would change to 111019.003_tk.dng and 111019.004_tk.dng. That is not good.

    I realize the easiest way around this is to name them properly the first time, but I'm not the photographer.

    Hope that makes sense and thanks.

    Bulk Rename in THE Bridge: -.

  • batch rename files with wildcards

    How can I batch rename 100 files so that I change only the first four characters of a name of fifty character where the last 30 characters are different for each file name?  To BACK the rename command would work with wildcards, but my files names are too long for BACK.  I tried the select all, press F2 and change the first, but all the characters changed instead of just the characters that I have edited.

    Brad

    Windows XP, Vista, 7

    Brad

    It is a small flexible program. Download the 32-bit version or 64-bit Bulk Rename, here http://www.bulkrenameutility.co.uk/Main_Intro.php

  • Script/batch to the VPN Client

    Is it possible to pass a script/batch of concentrator vpn to client vpn software when establishing a vpn (as the nt done with netlogon) session?

    Tips are welcome.

    Thanks in advance

    Edgar

    No, not possible. You can get the client to automatically run a program using the "Application Launcher" on the client, but it has limited use and the program to execute cannot be transmitted from the hub.

  • Illustrator cs6 "incorrect serial number".

    I'm trying to re - install adobe illustrator cs6 on a new machine, as the old machine of users is removed. When I enter the serial no, I get the invalid message.

    I work for the Ministry of transportation of Ontario and we purchased volume licensing. To improve things, the person initially, that it has been deployed is no longer here. I have the following if necessary:

    Order number

    Number from the end-user to purchase

    Reseller PO number

    Contract number

    Help, please

    Chris

    Tips: 1. a volume license must be used with volume license software, you cannot use the regular download. 2. don't forget to contact your volume license media, not retail support. 3 CS6 is now out of support which can be a problem.

  • Adobe Illustrator CS6 My trial expired, I need the serial number to complete the installation, but my account does not have the serial number

    Adobe Illustrator CS6 My trial expired, I need the serial number to complete the installation, but my account does not have the serial number

    Find the serial number of your Adobe product quickly

    To the link below, click on the still need help? the option in the blue box below and choose the option to chat...

    Make sure that you are logged on the Adobe site, having cookies enabled, clearing your cookie cache.  If it fails to connect, try to use another browser.

    Serial number and activation support (non - CC) chat

    https://helpx.Adobe.com/contact.html?step=PHSP-PHXS_downloading-installing-setting-up_lice nsing-activation_stillNeedHelp

  • "What is the maximum number of layers that can be added to a PDF form in Acrobat ms?"

    What is the maximum number of layers that can be added to a form, Acrobat DC?

    I don't think that there is a strict limit on this.

Maybe you are looking for

  • I have reset my security question

    I have a problem with the alternative of the email he in the meantime And I need reset my security question Please < email published by host >

  • Re: Bang &amp; Olufsen sound is very small and her awlful...

    Problem similar here on HP returned the group as audio failure diagnosis was the result unit reurned and tested on after 20 minutes BBC radio same terrible first problem noise not his systeyem B & O rubish visited their site and then they recognize n

  • KB977206: this update is not applicable to your computer.

    I tried to install Windows xp mode in my windows 7 PC. I installed Windows xp and virtual PC, and then kb977206 to installation mode on the pc without hardware virtualization. But it throws the error message indicating that my computer is not applica

  • Skype throws me when reply or call! Message makes no sense!

    When I'm trying to answer a Skype call or make a call on Skype I threw off Skype!  and told me to install the latest version of Skype... When I do this I tells me I already have the latest version and asks if I want to install an older version!  The

  • Error fatal Q5 blackBerry on 10.3 updated

    I tried to update the software on my phone and it says fatal error. I usually check the error code but it is not a so I thought I would ask here. I tried to update via Blackberry link on my computer and that's when I get the fatal error. And he didn'