4 Replies Latest reply on Aug 19, 2010 9:05 AM by Econometric

    maintaining index ID between files

    Econometric Level 1

      Is there any way to to copy a table from one file to another and maintain the index id of that table?

       

      Mike

        • 1. Re: maintaining index ID between files
          [Jongware] Most Valuable Participant

          Theoretically, no. The index seems to be the nth number of tables, where the first in your document always is #0, the second #1, and so on. If you copy table #1 into another document where it's the first, its index simply reverts to '0'.

           

          But not all is lost. If you need to be able to track down a table you created or copied earlier, you can assign it a unique label instead. How you would prevent adding a new table with the same label to your document depends entirely on where they come from (all from the same document? from different documents?) and, most important, what your intention is.

          • 2. Re: maintaining index ID between files
            Econometric Level 1

            Thank you for your help with my questions, you have been very helpful!

             

            I was wondering, if I wanted to get the ID for an entire page, how do I select the entire page so that when I run the program it gives me the "page ID"?

             

            Thanks,
            Mike

            • 3. Re: maintaining index ID between files
              [Jongware] Most Valuable Participant

              Javascript (and other scripts) don't need 'a selection'. You can get the id of any page with this script:

               

              alert (app.activeDocument.pages[0].id);

               

              (which will show the ID of page #0, the first page in your document), or something like

               

              alert (app.activeWindow.activePage.name+"="+app.activeWindow.activePage.id);

               

              to have it show the "name" (the page number) and id of the current visible page.

              1 person found this helpful