Copy/Move Layerset From One Document To Another Without Flattening

Hello,
Does anyone know how to move a layerset from one document to another using JavaScript ExtendScript, but without having to flatten the layers first as I still need to edit them after the move.
Many Thanks,
James

This requires that you have the the two documents open the first document open is the one you are copying from with the layer/layers selected.
activeDocument=documents[0];
dupLayers();
function dupLayers() {
    var desc15 = new ActionDescriptor();
        var ref12 = new ActionReference();
        ref12.putEnumerated( charIDToTypeID('Lyr '), charIDToTypeID('Ordn'), charIDToTypeID('Trgt') );
    desc15.putReference( charIDToTypeID('null'), ref12 );
        var ref13 = new ActionReference();
        ref13.putName( charIDToTypeID('Dcmn'), documents[1].name );
    desc15.putReference( charIDToTypeID('T   '), ref13 );
    desc15.putInteger( charIDToTypeID('Vrsn'), 2 );
    executeAction( charIDToTypeID('Dplc'), desc15, DialogModes.NO );

Similar Messages

  • FW CS5: Copy Page from one document to another without changing layers

    Hi,
    how can I copy a Page from one document to another without changing the layers?
    Drag-and-drop isn´t possible and by Copy-Paste all elements are placed in the same layer.
    Greetings,
    toho

    Use File > Import.
    Open the File, then navigate to the page you want to import
    Be sure to select Insert after current page, or FW will just import the content into the current page itself.

  • Is there a way to move files from one folder to another without copying and pasting and then going back to delete the original?

    Is there a way to move files from one folder to another without copying and pasting and then going back to delete the original?  The cut and paste function is not available and there's no "move to" function.  Am I missing something?  It was so easy with Windows.

    Drag the files, or press Option when pasting them; this accesses the Move To function.
    (124070)

  • [CS3 JS]  Move pages from one document to another?

    First, a brief explanation of what I am trying to do. I have several individual chapters that I am including in an INDD book. However, I also want to be able to allow those individual chapters to stand alone, meaning that I want to add a cover/title page to each chapter file (these two pages would be placed before the current page 1 of each chapter).
    My preference would be to write a script that would open the cover/tp file and open the first chapter file; this part is no problem. Where I am running into trouble however, is the second step: moving the cover/tp pages (2 pages) over into the chapter file.
    Manually, I would open Cover.indd, activate the "move pages" menu, "Move pages: 1-2", "Destination: Before_Page 1", "Move to: Chapter1.indd".
    With over 100 chapters in the book, however, I would prefer to automate the process. I have looked into the Page.move and PageItem.move elements, but both look like they would require a location in the current document (either in (x,y) form or using "AT_BEGINNING".
    If I cannot get this to work, I will likely try to insert two blank pages, then cut/paste with a script, but I would prefer the "move" functionality, if it is possible.
    A couple of answers to potential questions:
    I can't simply place the INDD cover file b/c it uses a text variable to pull the chapter name; this personalizes each stand-alone chapter.
    Same answer to why I can't just slap the 2-page .pdf on the front of each. I need the text variable to still be active.
    Has anyone tried to move pages from one document to another using scripting? I tried to explain what I am trying to do, but if it doesn't make sense, I can try again. :)
    thanks!
    Matt

    ok here we are
    I get a raw skeleton that you will have to adjust but it's functional.
    Use a PDF for placement as you can specify the page that you want to place.
    I don't know if you can do the same for indesign files.
    So basically, it starts adding 2 pages and placeing the pdf in the same time.
    After that, it creates the textVariable and the frame that will receive it.
    Here you are:
    //If a document is open
    if(app.documents.length!=0)
    var ad = app.activeDocument;
    //Pages placement
    for(i=0; i<2; i++)
    //Add 2 pages on top of the document;
    var tmpPg = ad.pages.add(LocationOptions.BEFORE, ad.pages[0]);
    //Here you place your pdf
    app.pdfPlacePreferences.pageNumber = i;
    tmpPg.place(File(cover.pdf), false)
    //You should specify page x and page y but ain't found yet the way to go.
    //Text variable creation
    //Check if the textVariable named "txtVar" does not already exist...
    if(ad.textVariables.item("txtVar")==null)
    //if not found, create the text variable named "txtVar"
    var txtVar = ad.textVariables.add();
    txtVar.variableType =VariableTypes.CUSTOM_TEXT_TYPE;
    txtVar.name = "txtVar";
    //Set the contents of the text variables to the string "test"
    ad.textVariables.item("txtVar").variableOptions.contents = "test";
    //these coordinates don't care aboutyour units but you may adjust them to your needs
    var y1 = ad.marginPreferences.left;
    var x1 = ad.marginPreferences.top;
    var y2 = y1+5;
    var x2 = x1+25;
    var myFrame = ad.pages[0].textFrames.add({geometricBounds:[y1,x1,y2,x2]});
    //Set the contents of the frame to the text variables "txtVar"
    myFrame.contents=ad.textVariables.item("txtVar").variableOptions.contents;
    //You may want to stylize the txtVar
    //In this case, either you use a existing characterStyle or you create one in the script
    Bye Loic

  • Copy a page from one Document to another

    Can anyone help
    In Pages '08 we had the ability to copy a page from one document to another.
    In Pages '09 this does not seem possible.
    Does anyone have anwser....
    Thanks
    Message was edited by: AJCUR
    OK my bad
    I just realized that I was in Word Processing in one document and Page Layout in another and you cannot do the copy between the two. Changed the Blank documentto word processing and voila it worked.

    I think this might help. Go to the document you want to copy the page from and go to the "View" menu and choose "page thumbnail" so you can see the thumbnails on the side of the document. Right click (or control click) on the thumbnail of the page you want to copy and choose "copy.
    Go to the document you want to paste the page into and make sure you have the "View thumbnail" option turned on. If you already have some pages click on the page you want the new page to follow and then right click and paste the page where you want it. (you have to do this in the thumbnail view area, not in the actual document itself.) If you have inserted the page in the wrong spot, just drag it to the right location. note: I have tried dragging the thumbnail from one document to another and it does not work. Too bad because it works that way with a PDF documents in "Preview" app.

  • Cs sdk: copying an item from one document to another

    is there a way to copy any item from one ai document to the other ?

    I'm not one for bumping old threads, but this problem is really giving me a headache...
    I'm having the same exact problem with copying groups from one document to another.  It doesn't seem to matter if it's a top-level group or not; any group that gets copied over results in the copied art not showing up in the layer list and gives errors when trying to click on it.
    If my source document looks like this:
    Layer 1
      <path 1_1>
      <path 1_2>
      Layer 2
        <path 2_1>
    If I DuplicateArt on the GetFirstArtOfLayer(Layer 1), Layer 1 gets copied into the new document, but it doesn't show up in the layer list and I get errors trying to click on any of the art.
    If I iterate over the children/siblings of Layer 1 and duplicate them all separately, <path 1_1> and <path 1_2> will show up correctly in the new layer list and are clickable, but Layer 2 will not, and clicking on <path 2_1> results in the error.
    At this point, the only solution I can think of is to recursively iterate over the source tree, manually creating the destination groups, and then copying the art work into them.
    Very frustrating!

  • Copy an Image from one document to another

    Is there an easy way to copy a rectangle containing an image (not a link to an image) from one document to another?
    Thanks.
    Chris.

    I can now copy-paste text frames and linked graphics from one document to another using snippets, but embedded images still don't work.
    If I embed an image from a pdf file it works but not for jpeg images. When I open the new document (for which I placed the snippet) in InDesign, there is a frame (with a dark grey background and a diagonal cross) shown, but no contents. The place() method did not throw an exception. What am I doing wrong?
    Chris.

  • When I move pages from one document to another, it creates a new alternate layout.

    Hello,
    I'm having an issue with combining some documents. Usually I use the "move pages" command and tell the pages to integrate with another document. However, because of the new alternate layout feature, both documents have the default layouts as "Letter V". So when I move pages from one document to the end of another, it creates a new alternate layout labeled "Letter V2" and "Letter V3" etc. Is there a way to make the pages just go into the main layout of Letter V without creating a new alternate layout? How do I merge alternate layouts created in the integrated document? All documents are the same page size and orientation.
    Thank you kindly,
    Sheena

    Petrill,
    Thank you. I was trying to do that yesterday, but it was grayed out. It seemed to work alright today.
    Thanks,
    Sheena

  • How to move sections from one document to another?

    In Pages 08 I could merge two documents by simply moving the sections from one document to the other one. By activating the thumbnail-view you could drag and drop sections. In Pages 5.2.2 that doesn't work. Any suggestions? Copy and paste doesn't work, because the layout is broken afterwards.
    Jan

    You only recourse in Pages v5 (any release) is copy/paste between documents, and its layout consequences; follow Peter's advice, or use a non-Apple word processing solution that allows you to get work done effectively. Apple put dumbnation into Pages v5.

  • Copy/Move Itunes from one computer to another

    Greetings,
    I need help...I purchased a new Sony Vaio laptop and wanted to copy all my music (itunes, walmart purchases, and music ripped from CDs). I read all I could online, including this site and consulted a local college student. All said I could just copy the entire My Music folder from one computer to the other. I did (making sure I placed the itunes song in the Media folder) and then added folder to the Library. Everything works fine except I do not have the ability to looked at my purchased songs. (1) How do I recreate the purchased songs log? (2)Is there a legal issue of leaving the songs on the old computer (desktop)? (3) Are there any problems/issues I need to know before I get too far down this path? Thanks for your help. BTW, I have made backups of my itunes account.

    You're welcome!
    +First, if there is an easier method of copying the library,+
    There is, and the method you tried at first should have worked. Are both PCs running the same version of itunes? If they are both at the latest version 9, did the old PC ever have itunes 8 on it before?
    +All said I could just copy the entire My Music folder from one computer to the other. I did (making sure I placed the itunes song in the Media folder) and then added folder to the Library.+
    There shouldn't have bee any placing itunes song in the Media folder - they should have already been there. And you shouldn't have had to add the folder to the library. Copying the entire folder over should have been as easy as opening itunes and seeing the complete library as it looked on the old PC. Sounds like you started with a blank library on the new PC and added songs - that's adding some steps that changed the desired result.
    Second, I do not have a Green "Purchased" icon under the STORE
    When you start with a blank library and haven't made any new purchases, that's normal. If you get a free single of the week it will show up. Then you can add your previous purchases like I posted with the smart playlists.
    Or you can go back and do the move from the old PC correctly, and it will all be there.
    Let's get all that sorted before talking artwork - you're right, WMP gets artwork from AMG and itunes locks you into the itunes store. But that is another thread!
    oops, I meant to ask if you have read this iLounge article and understand the difference between itunes library content vs itunes library database
    http://www.ilounge.com/index.php/articles/comments/moving-your-itunes-library-to -a-new-hard-drive/
    Message was edited by: Katrina S.

  • Copying an object from one document to another in CS4

    When more than one document is open in CS4 (for example document 1 and document 2), and the documents are arranged with tabs at the top, it should be possible to drag an object from document 1 to the tab of document 2, have the tab of document 2 automatically come to the top, and then drop the object onto a page in document 2. Is this a bug or is it just me?

    You're right, it SHOULD be, but it isn't. I filed a feature request as soon as CS4 was released, but add your voice at http://www.adobe.com/cfusion/mmform/index.cfm?name=wishform
    In the meantime you need to either use copy/paste or switch to a tiles view.
    Peter

  • Swatch palette becomes full of unused colors when copy and paste from one document to another!!

    sometimes (i haven't found a pattern yet of when) when i copy and paste an object that is solid black (for example) into another Illustrator document, a bunch of unused swatches copy into the swatch palette for no reason! lots of "default global colors" and PMS swatches. i then have to 'select all unused' and delete them all to clean out the palette (which always seems to stall while thinking when selecting or deleting them). often times i get the global swatch warning (always 2x, not just once) before placing an object and before the whole swatch palette fills up with unused colors.
    this has only happened recently in the last few months and i have been using Illustrator for years so i'm not sure what's stemming this. a new update? has anyone else noticed this problem and know a solution? is there a preference checked somewhere that i don't know about?
    guess i should mention i'm on CS3 Illustrator running MAC OS 10.5.6
    thanks,
    kim

    I've had this problem before as well and it has to do with a currupt file that your coppying from. It's too complicated to explain here so here is my fix for it.
    I take the file and save it down or up in CS1. Open infected file in CS1. Create a new file in CS1 the same size as the one you've opened. Select all and drag and drop into the new empty file. Don't copy paste, it must be dragged into the file. You can then delete all global colours and save your file. The curruption will be gone. There's a way to check suspect files to see if they have the deleted global colours present. Open your suspect file in a text editor like simple text, scroll down a little way and if you see a bunch of lines of code mentioning "deleted global colours" then you know it's infected and has to be fixed.
    Hope this helps
    Here is another idea from a bit of research I just did. Don't know if this works or not but you might want to give it a try and it explains the issue in more detail
    http://adobe.groupbrowser.com/t177412.html

  • Move layers from one document to another

    I have two catalouges of about 200 pages in two different languages. Each language is at a seperate layer. I want to move one layer to the other document. I can do that without problems for one page (with copy/paste in place). But is it possible to do easily with so many pages? As far as Im aware it cant be done in InDesign CS4, but maybe there is a plug in that can do the work?
    Gert

    I have a script that may do the job... I try to send it, I have some problems with this forum software...
    Copy script to your indesigns script folder
    Open your source and target documents
    Backup them, results with scripts may sometimes be suprising, specially if script operates inside multiple documents
    Hide all the other layers, keep the one you want to copy visible
    Run the script
    Keep Visible layers only checked
    Hope it works
    Script is originally made in german by Martin Fischer.
    Direct link to script if attachment doesn´t work
    http://files.getdropbox.com/u/133381/copyLayers.jsxbin

  • How can I copy a page from one document into another?

    I have produced a document in two separate fils and want to merge them into one.  There are six pages in each file, I need to put them I to one file, turn into a PDF and then mail them.

    Menu > View > Page Thumbnails > click on them > Copy > Paste into Thumbnails of other document
    Peter

  • How do I copy an album from one mac to another without duplicating the photos

    When I try to copy an album of photos from my wife's mac to mine, I just want the "album". I already have the photos. But I want to have that subset in the order she put them in. However, all I can figure out to do is "copy" that album, importing all the photos again as duplicates, then taking Last Import and making the album from that. And it doesn't necessarily preserve the order that the photos were sorted into. Surely there's an easier way. Is there?

    You can not have an album with out haveing the photos so it is impossible to do this
    You can use iPhoto Library Manager - http://www.fatcatsoftware.com/iplm/ -  to move albums between iPhoto libraries
    LN

Maybe you are looking for