How to duplicate the layer and rename it?

Greetings to all.

I do a little tool, and I need to duplicate the layer, change of name and so...

Tell me how to change the name of the layer? After all, when duplicate layer app.activeDocument () of the range slider layer remains on the same layer. Can be done through hard brace, but I think that there is a simpler solution.

Thank you

Layers have a name property that can be changed via the Script.

2014, use it at your own risk.

#target photoshop

If (app.documents.length > 0) {}

theDoc var = app.activeDocument;

var theLayer = theDoc.activeLayer.duplicate (theDoc.activeLayer, ElementPlacement.PLACEBEFORE);

theLayer.name = "test";

theDoc.activeLayer = theLayer

};

Tags: Photoshop

Similar Questions

  • How to duplicate a layer and then change the adjustment layer?

    This used to be easy to PS7, but he is evasive in CS4. Sometimes we need to duplicate a layer, then change the adjustment layer. For example, we may have selected a portion of an image and used the brightness contrast and then we need to create a new layer using the same section using selective correction. What we have done in the past, is to duplicate the layer, and then change the adjustment layer. Any ideas?

    Create your new adjustment layer. Option drag the mask layer on the new original setting, and then choose replace.

    Beware of the many similar masks:

    http://www.teddillard.com/2008/10/Geekzone-rosenholtz-Sanchez-effect.html

  • How to duplicate the artboard and move it over the original?

    Basically, I have a document open and want to duplicate its work plan and then move it to a new location (the X axis, the original 50pixels). Doesn't seem too hard, but I can't understand it. This is for CS5.

    var app.activeDocument = docRef;

    var abSrc = docRef.artboards [0];

    var abSrcX = abSrc.artboardRect [0];

    var abSrcY = abSrc.artboardRect [1];

    var abSrcW = abSrc.artboardRect [2];

    var abSrcH = abSrc.artboardRect [3];

    abSrcX = abSrcX + 1221;

    var abSrcRect = [abSrcY, abSrcW, abSrcX, abSrcH];

    dupAB var = docRef.artboards.add (abSrcRect);

    The above works a bit. Original work plan is 17 "x 11" (1224px x 792px) and when I put abSrcX to the foregoing 1221, extendscript throws an error PARM. During one of my sessions of trials and errors, I decided to see what was the document geometricBounds:

    $.writeln (docRef.geometricBounds); = 45-12, 1221.154296875,-780

    So now, I see a bit where I can't go more than 1221, but why can't I?

    I moved the artboard for everything at the top left of the document and I got the geometricBounds again and they were - 6754.5,7038.5,-6463.5, 6736.5, but still can not abSrcX anything about 1221.

    the error is "error Illustrator: 1246458189 ("PARM").

    I tried to understand this is what courses I can think, but nothings working. Any input or help would be GREATLY appreciated!

    EDIT:

    So I tried this for the hell of it:

    var abSrcX = 0;

    var abSrcY = 1224;

    var abSrcW = 1224;

    var abSrcH = 792; (for some reason any 792 translates into 6 "inside the Illustrator, so I put this 432 to make 11")

    var abSrcRect = [abSrcY, abSrcW, abSrcX, abSrcH];

    dupAB var = docRef.artboards.add (abSrcRect);

    and it adds a new work plan and move to X, Y, such that designated. Not exactly what I want, but narrowing down the issue.

    I'm trying

    var abSrcX = 1224;

    var abSrcY = 0;

    var abSrcW = 1224;

    var abSrcH = 792;

    var abSrcRect = [abSrcY, abSrcW, abSrcX, abSrcH];

    dupAB var = docRef.artboards.add (abSrcRect);

    and he throws that error PARM still once, then now there is really no sense!

    Edit2: I changed abSrcY to 10000 and now the height of the artboard is really long, which is insane even more... I don't have the (x, y, width, height) artboardRect down wrong?

    Edit3: If after one more google search, I found out what the problem is. artboardRect is HIGH, LOW, LEFT, RIGHT; and when I do:

    var abSrcX = 1368;

    var abSrcY = 0;

    var abSrcW = 2592;

    var abSrcH = - 792;

    var abSrcRect = [abSrcY, abSrcW, abSrcX, abSrcH];

    top down right and left;

    dupAB var = docRef.artboards.add (abSrcRect);

    This works. BUT I have no idea what the numbers are in relationship with. The center of the artboard? The document Centre? And if I run it again and change... oh dear.

    I think that I just thought of it.

    abSrcX is on the LEFT;

    abSrcY is HIGH;

    abSrcW is RIGHT;

    abSrcH is DOWN;

    Considering that if I add (1224 + 144) to abSrcX and abSrxW, it creates another work plan 2 "away from the previous 17" x 11 ". If I want to run again, I just have to add (1224 + 144) abSrcX and abSrxW again. Now to find a way to do it dynamically on the fly.

    I still like to hear comments on the question of whether this is good or bad, and how I can improve!

    @clrx01,.

    Why do you work with width and height work plan?

    IMHO you need what only once.

    Try something like this:

    // ArtboardCopy.jsx
    // http://forums.adobe.com/thread/1320239?tstart=0
    //        How to duplicate artboard and move it relative to original?
    // regards pixxxelschubser
    
    var docRef = app.activeDocument;
    //var abSrc = docRef.artboards[0];
    var abIdx = docRef.artboards.getActiveArtboardIndex ();
    var abSrc = docRef.artboards[abIdx];
    
    var moveX = 50;
    
    var abSrc_L = abSrc.artboardRect[0];
    var abSrc_T = abSrc.artboardRect[1];
    var abSrc_R = abSrc.artboardRect[2];
    var abSrc_B = abSrc.artboardRect[3];
    
    var next_ab_L = abSrc_R + moveX;
    var next_ab_T = abSrc_T;
    var next_ab_R = next_ab_L + (abSrc_R - abSrc_L) ;
    var next_ab_B = abSrc_B;
    
    //top left right bottom;
    
    var next_ab = docRef.artboards.add([next_ab_L, next_ab_T, next_ab_R, next_ab_B]);
    

    Have fun

  • I downloaded a template that I need to fill out multiple times for different customers.  How to duplicate the model and save it in Adobe?

    Help

    Hi elir36398870,

    Forming this model is in? If it's a PDF file, then I suggest to make multiple copies before filling for various clients.

    Or whenever you want to save the PDF file, use Save as instead of save option to make a copy of the file.

    Thank you

    Abhishek

  • How to store the original and to remove some duplicate songs in iTunes on a PC Win7, which took place after iTunes to scan for music during a re - install?

    How to store the original and to remove some duplicate songs in iTunes on a PC Win7, which took place after iTunes to scan for music during a re - install?

    I recently had to format my hard drive and reinstall iTunes 12.3.2.35 on my Win7 PC. As part of the re - install iTunes, I clicked on the button scan for music.  This has created duplicates several of my songs.  I deleted then the duplicate songs from iTunes, but when I went to play a few songs a pop-up said "the song would not be because the original could not be found.  You want to locate? "When I tried to locate the song it is not found, but when I pulled the songs out of the trash they could be found.

    How can I keep the original and remove any duplicate songs in iTunes on PC Win7 which took place after iTunes to scan for music during a re - install?

    iTunes can create duplicates if the same content is added several times from outside the media folder when it is about to make copies of everything that is added to the library, or is added from an external drive that hosts the press kit that was disconnected during the launch of iTunes.

    Official notice of Apple on the duplicates is here: find and remove duplicates in your iTunes library. This is a manual process and article fails to explain some of the potential pitfalls such as the lost coast and membership of playlist, or sometimes the same file can be represented by multiple entries in the library as well as a removal and recycling the file will break all the others.

    Use MAJ > display > show items to reproduce exactly to display the duplicates because it is normally a selection more useful. You must manually select all but one of each group to remove. Sort the list by Date added can make easier select appropriate tracks, but it works better when executed immediately after the dupes were created.  If you have several entries in iTunes connected to a same file on the disk hard then don't not send to trash.

    Use my DeDuper script (Windows only) If you are not sure, do not want to do it by hand, or want to maintain ratings, play counts and playlist membership. See this background thread , this post for detailed instructions and Please take note of the warning to back up your library before deduping.

    (If you don't see the menu bar press ALT to temporarily view or CTRL + B to keep displayed.)

    The latest version of the script can put away the dead links as long as there is at least a double live to merge his stats and membership of the playlist and must deal wisely when the same file has been added through multiple paths.

    TT2

  • How to record the numbers and words in the same file

    Hello:

    I did a vi where I record the spectrum and its integration in different positions of a two-dimensional net. I save the information in two spreadsheet with the comand "write to file measure."

    Now, I am recording the parameters initial positions, end X X and space between measurement points. I want a file with two columns that looks like:

    Initial position X 1000

    final position X 2000

    space 100

    But idon't know how to save the words and numbers in the same file.

    As I have to perform several steps I want to automatically choose the name of the file (something like parameters_1, parameters_2...)

    Thank you for your attention

    Hi bitxor.

    You can use all the functions of the WriteTotext file to write strings to a file.

    Then you could set up WriteToMeasurementFile' to add new data to existing files (instead of overwrite or renaming)...

    BTW. It is not a good idea to mix lvm files containing arbitrary spreadsheet data!

  • deleting files duplicate, the shadows and ghost from hard disk

    I had to sweep and re-download my pc about 3 times. There are still remnants of programs that I deleted, and I don't know how to erase them completely. Is there a software that will clean files duplicate, the shadows and Ghost and which will get rid of remnants of deleted files. Any help will be appreciated. Thank you

    Hello

    · What is the location of the remaining files of the programs that you have removed?

    You can run the disk cleanup utility to remove all unnecessary files on your computer.

    Delete files using disk cleanup

    http://Windows.Microsoft.com/en-us/Windows-Vista/delete-files-using-disk-cleanup

    Hope this information is useful.

    Amrita M

    Microsoft Answers Support Engineer
    Visit our Microsoft answers feedback Forum and let us know what you think.

  • Duplicate the layer just above the layer source by script

    Hello

    I'm trying to duplicate the layer by using script. Layer duplicated only taking place at the beginning of the order of the layers. I want the duplicate layer just above the layer.

    I got this forum.

    var docRef = app.activeDocument;  
    with(docRef) {  
             var ll = docRef.activeLayer ; 
             var ln=ll.name;
             var ol = layers.getByName(ln);  
                   ll.visible = false;  
            var nl = layers.add();  
             nl.name = 'Duplicated Layer';  
             for (var a = ol.pageItems.length-1; a >= 0; a--) {  
                  ol.pageItems[a].duplicate(nl, ElementPlacement.PLACEBEFORE);  
                  nl.visible = true;
             }  
        }  
    
    //~ ElementPlacement.PLACEBEFORE); // moves it above a group named 'my group' in the stacking order  
    //~ ElementPlacement.PLACEAFTER); // moves it below a group named 'my group' in the stacking order  
    //~ ElementPlacement.INSIDE); // moves it inside a group named 'my group', at the top of the stacking order  
    //~ ElementPlacement.PLACEATBEGINNING); // moves it inside a group named 'my group', at the top of the stacking order just like ElementPlacement.INSIDE  
    //~ ElementPlacement.PLACEATEND);
    

    Screen Shot 2016-06-28 at 11.20.59 AM.png

    I duplicated the layer 2 and place it at the top. Strange.

    Help, please

    Kind regards

    Kitty

    Try this code...

    var docRef = app.activeDocument;
    with(docRef) {
        var ll = docRef.activeLayer ;
        var n=docRef.layers.length;
        x=ll.zOrderPosition;
        var ln=ll.name;
        var ol = layers.getByName(ln);
        ll.visible = false;
        var nl = layers.add();
        nl.name = 'Duplicated Layer';
        for (var a = ol.pageItems.length-1; a >= 0; a--) {
            ol.pageItems[a].duplicate(nl, ElementPlacement.PLACEATBEGINNING);
            nl.visible = true;
        }
        docRef.layers.getByName("Duplicated Layer").move(docRef.layers[n-x], ElementPlacement.PLACEAFTER);
    }
    

    -yajiv

  • How to duplicate an image and then put side by side

    How to duplicate an image and then put side by side

    This link might show the CS4 menu:

    Dual View Photo retouching in Photoshop tutorial

  • How to duplicate the composition that contains nested compositions?

    I know that if you duplicate the composition in the project the object containinf window will not be dependent on original model. But what about complex compositions that has nestled in 2, 3 compositions, how to duplicate the model of the root and make all the comps child separated from the original?

    http://aescripts.com/true-comp-duplicator/

    Mylenium

  • How to copy a layer and its mask layer to another image?

    With the help of PSE9, how a copy a layer and its mask layer to another image?

    Online Help includes a topic on how to copy a layer but try the different methods in the help topic results in either nothing copied or just the layer without his mask layer is copied.  Thank you.

    How did you get a copy?  If you float your images so that they are both partially visible in the work area, make one with the being copied the active layer.  Then, drag the layer in the layers palette on the other image.  Now you should have both the layer mask on the second image.

    Jürgen

  • How to duplicate a layer

    Is it possible to duplicate a layer of timeline in Flash CS4, including all keyframes? I use it a lot in Illustrator and Photoshop, but not here. Y at - it something to do this?

    The only way I know is to select all the images on the layer, right-click and select copy images, insert a new layer and delete everything except the first image, click with the right button on the image on the layer and select Paste images

  • How to use the capture and the print button

    I tried to figure out how to use the capture and the "print" button, or add or what you call. I press it and the whole page of a different color changes, so I try to cut the section I want but I don't know how to send it to the printer. Can someone help me with this. I'm not at savvy with tech stuff, but when I find a recipe or something and it doesn't have an option to print a certain area, I can't understand how to use it?

    Thank you

    Andi Starbuck

    That happens to me is, I click and drag to make a rectangle of yellow selection, and as soon as I raise my finger on the mouse button, the part I've selected is captured as an image, a new tab opens and preview before printing, the image display. I can use the installation of the Page or simply print. But if I close the preview, this temporary image vanishes and I'm back on the page where I started. You see something different?

  • How do you the bookmarks and history buttrons open boxes in Firefox 33?

    How I make the bookmarks and history buttons open their respective boxes instead of having to use the submenu stupid button on the sidebar?

    Apparently, the Restorer of classic theme worked for Firefox 29, but it does not work for 33:
    https://support.Mozilla.org/en-us/questions/991080

    There are two sets of buttons of toolbar tools for history and bookmarks in the palette to customize with the CTR extension installed. You need those without drop marker to open the sidebar.

  • How I change the fonts and colors of default return?

    I changed the font and the color of the text through the Tools button and the button options and the tab content. I can't find anything tell me how to change the fonts and colors to the colors and fonts by default. Can you advise me? I use Windows 7 Home Premium OS. Thank you.

    Hi Brenda19605,

    You can use this article to set the fonts and colors: https://support.mozilla.org/en-US/kb/change-fonts-and-colors-websites-use?esab=a & s = do & r = 0 & s = as

    The default settings for the police are in this article:
    https://support.Mozilla.org/en-us/KB/some%20text%20shows%20up%20bold%20after%20upgrade

    Unfortunately for the default color has no good reference. For the text, but it is black (most lower-left), the background is white (color above left). Unvisited links is blue (column 8, line 5) and the visited link is purple (column 9, line 5).

    Let me know if you need help more!

    Lordfreak

Maybe you are looking for