Move all the items of a layer to new page?

hi,
is it possible to move all the items in the layer to move to the new page with the same coordinates in the page 1
eg:
i have two layer named "layer_page1"and one more layer named "layer_page2"
i have 2 text frame objects , 1 rectangle objects in the "
layer_page1" and 3 text frame objects, 3 rectangle objects in the "layer_page2"
all the items are in the page.items(0).
now i will add a new page to the document
and i need to move all the items in the layer named "layer_page2" to the new page, i.e page.item(1). is it possible?
if it is possible it will solve lot my efforts typing.. and verifying.
your comments are highly appreciated.

John,
hm, I don't think your untested script will work in a predictable way. Technically it will work a bit. Just tested it. But:
1. if you loop from index 0 to the end, even if you loop from the end to index 0 you will mess the index of the pageItems when moving them to a different page
=> I recommend grouping all pageItems on the specified layer, so that we have to move only one pageItem, the new group
2. problem with move() to another page is, that you cannot retain the original page coordinates of the moved object, it will get 0,0 coordinates automatically
=> we have to store the coordinates of the group first, then move, then apply the old coordinates
3. in a real-world scenario we should deal with the possibility of locked pageItems
4. Furthermore we have to make sure that the layer is not locked
The following example will unlock all pageItems on that layer and will lock them after they are moved:
//Move all objects on a layer of a page to a different page
var
  d=app.activeDocument,
  src=d.pages[0], dst=d.pages[1],
  layer=d.layers.itemByName("Layer 2"),
  i;
var myItemsToMove = new Array();
var myItemsLocked = new Array();
for (i=0; i<src.pageItems.length; i++) {
    if (src.pageItems[i].itemLayer === layer) {
        if(src.pageItems[i].locked){
            myItemsLocked.push(src.pageItems[i].id);
            src.pageItems[i].locked=false;
        myItemsToMove.push(src.pageItems[i]);
//Check, if layer is locked:
if(layer.locked){
    var layL = true;
    layer.locked=false;
// create a group on the source page:
var newGroup = src.groups.add(myItemsToMove);
var gB = newGroup.geometricBounds;
//We have to move only ONE object, the new group
//To the destination page
newGroup.move(dst);
//To the old coordinates
newGroup.move(undefined,[gB[1],gB[0]]);
//Restore the state of the pageItems
//Ungroup them once:
newGroup.ungroup();
//Relock the former locked objects:
for(n=0;n<myItemsLocked.length;n++){
    d.pageItems.itemByID(myItemsLocked[n]).locked=true;
//Relock layer if it was locked:
if (layL){layer.locked=true};
Uwe

Similar Messages

  • In Oracle Forms, to run all the When-Validate-Item of all the items at once

    In Oracle Forms, is there any built-in / procedure / function which is used to run all the When-Validate-Item triggers of all the Items at once ?
    I will put it in detail :
    When a form is run and while entering the data..
    when we enter some data and try to move out of that item then the When-Validate-Item trigger of that item is fired and the code in that trigger is executed..
    Similarly there may be many items and many When-Validate-Item triggers correspondigly in a form..
    My requirement is to run all the When-Validate-Item triggers of a form at once when we click a button which is created for that purpose only..
    So is there any built-in / procedure / function (to run all the When-Validate-Item triggers of all the items), which can be called in the When-Button-Pressed trigger of that particular button..
    If any one having any solution/suggestion, please let me know..
    Thanks..
    Edited by: user2938447 on Nov 8, 2010 9:03 PM
    Edited by: user2938447 on Nov 8, 2010 9:12 PM
    Edited by: user2938447 on Nov 8, 2010 10:19 PM

    Hi Sandy,
    Thanks for your suggestion..
    The validations should be done at Item level (When-Validate-Item as usually) and seperately again when a button is pressed.
    So to put all the code in another block-level When-Validate-Item trigger or in any When-Button-Pressed trigger will be duplication of the code.
    Actually I have around 30 Fmbs to be modified and each Fmb is having around 20 Items and almost all Items are having When-Validate-Item trigger.
    So,I wanted to know whether there is any Built-in / Procedure in Oracle Forms which runs all the When-Validate-Item triggers once it is called.
    Thanks..

  • How to move all the standard and adhoc reports from cube to multi provider

    How to move all the standard and adhoc reports from the basic cube to multi provider?
    i created this multiprovider to do the maintenence on the basic cube. for example the infocube physical partition, line item dimension and compression.
    what we decided to do is move all the Standard and ad-hoc reports from the basic cube to the multiprovider. How to do it? and make a copy of the basic cube and do the maintenence on the cube. please help.
    Thanks in advance sdn experts!

    Hi Les,
    This sounds good and one thing we try to always keep in mind when undertaking such activities is to always minimise the impact to the user and make the process as transparent to them as possible. So lets say you have your multiprovider and copied queries up in Prod, these queries will still pick up the data from the base cube.
    Now you need to make a copy of the base cube for some changes to the cube model, I would suggest that you copy the cube and make your changes on the copied cube itself. Then 9depending on the changes done) you can load data from Original Cube to New Cube. When this is being done, make sure that you change your queries to add a restriction on 0INFORPOV by Original Cube.
    After the load to the new cube is complete you can run reports restricted to each cube to verify the numbers. Then change the 0INFOPROV restriction in the queries to point to the New Cube and disengage the old cube from the multiprovider.
    Hope this helps...

  • How do I Select all the items in a document based on SpotColor?

    I'm trying to select every object with the color "CutContour"
    So far I've been trying:
    myDoc.selection = myDoc.spots.getByName("CutContour"); 
    I guess this obviouslly wouldn't work though because myDoc.selection is looking for an array of objects.
    However, I can't figure out how to loop through all the objects in the document and check to see if they contain the SpotColor.
    Any help would be incredibly appreciated!
    EDIT:
    I want to use the Select > Same > Stroke Color , but I heard that using that in Javascript isn't available unless you have CS6 (which I currently don't). Is it true that accessing menu items through scripting is a feature in CS6?

    Thanks for clearing some of that up for me!
    I only need to select path items, and I see that if I do something along the lines of:
    var objects = myDoc.pageItems;
    I can get an array of all the items in my document. However, I'm trying to figure out where to go from here, but the process seems overly complex. I want to loop through objects and see if they are pathitems, and then check to see if they have the color I'm looking for, but I can't find the strokeColor property in the Javascript reference. Also, what about compoundPathItems (closed paths)? If I check for PathItems, will I also get CompoundPathItems?
    EDIT:
    This is what I have so far, however, it is not working correctly /:
    var myColor = myDoc.spots.getByName("CutContour");var arrObj = [];for (var i = 0; i <objects.length; i++) {  if (objects[i].typename == "PathItem" && objects[i].fillColor == myColor) {    arrObj.push(objects[i]);    objects[i].move(layer_Cut, ElementPlacement.PLACEATBEGINNING);  }}
    See, the whole goal is to move all objects with the color "CutContour" to

  • Query For Finding Yearly Opening and Closing Balance for All the Items

    Hi Experts,
    I am working on Query Based Report for finding the Yearly Opening and Closing Stock for all the Items
    i will give yearwise selection and I want opening and closing stock in between that years
    Warm Regards,
    Sandip Kokate
    Edited by: Sandipk on May 20, 2011 1:58 PM

    Hi,
    Declare @SDate DateTime
    Declare @EDate DateTime
    Declare @Whse nvarchar(10)
    Set @SDate= (SELECT min(F_RefDate)  FROM  OFPR T1 where  T1.[Name] ='[1%]' )
    Set @EDate= (SELECT max(T_RefDate)  FROM  OFPR T1 where  T1.[Name] ='[%1]' )
    Set @Whse=(Select Max(s2.Warehouse) from OINM S2 Where S2.Warehouse = '[%2]')
    BEGIN
    Select @Whse as 'Warehouse', a.Itemcode, max(a.Dscription) as ItemName,
    sum(a.OpeningBalance) as OpeningBalance, sum(a.INq) as 'IN', sum(a.OUT) as OUT,
    ((sum(a.OpeningBalance) + sum(a.INq)) - Sum(a.OUT)) as Closing ,
    (Select i.InvntryUom from OITM i where i.ItemCode=a.Itemcode) as UOM
    from( Select N1.Warehouse, N1.Itemcode, N1.Dscription, (sum(N1.inqty)-sum(n1.outqty))
    as OpeningBalance, 0 as INq, 0 as OUT From dbo.OINM N1
    Where N1.DocDate < @SDate and N1.Warehouse = @Whse Group By N1.Warehouse,N1.ItemCode,
    N1.Dscription Union All select N1.Warehouse, N1.Itemcode, N1.Dscription, 0 as OpeningBalance,
    sum(N1.inqty) , 0 as OUT From dbo.OINM N1 Where N1.DocDate >= @SDate and N1.DocDate <= @EDate
    and N1.Inqty >0 and N1.Warehouse = @Whse Group By N1.Warehouse,N1.ItemCode,N1.Dscription
    Union All select N1.Warehouse, N1.Itemcode, N1.Dscription, 0 as OpeningBalance, 0 , sum(N1.outqty) as OUT
    From dbo.OINM N1 Where N1.DocDate >= @SDate and N1.DocDate <=@EDate and N1.OutQty > 0
    and N1.Warehouse = @Whse Group By N1.Warehouse,N1.ItemCode,N1.Dscription) a, dbo.OITM I1
    where a.ItemCode=I1.ItemCode
    Group By a.Itemcode Having sum(a.OpeningBalance) + sum(a.INq) + sum(a.OUT) > 0 Order By a.Itemcode
    END
    I hope this will work for you.
    In above query you can also user OFPR.Code, OFPR, Category OFPR.Indicator instead of OFPR.Name.
    Regards
    Vaibhav Anharwadkar
    Edited by: Vaibhav Ancharwadkar on May 24, 2011 9:23 AM

  • I have two Apple ID's.  How do I move all the songs and videos that I bought using Apple ID "A" over to Apple ID "B".  I plan to use Apple ID "B" from here on out.  Thanks

    I want to move all the songs and videos that I purchased using Apple ID "A" over to Apple ID "B". 
    I plan to use Apple ID "B" from here on out. 
    Thanks to all. 
    I'm using Macbook Air
    OS X ver 10.9.3

    You can't do this yourself; if desired, you can ask the iTunes Store staff if they'll do it, but they probably won't.
    (108496)

  • How do I move all the photos from the i-photo library on one account to the i-photo library on another account?

    I have recently bought a new mac mini running Lion, and yesterday I migrated an account off an older machine running Tiger.
    I want to delete the older account from this machine as it is causing some problems with i-cloud, but I want to transfer the photos first and add them to a different account on the new computer.
    So my question is How do I move all the photos from the i-photo library on one account to the i-photo library on another account?

    Copy the iPhoto library from the old Mac to the Desktop of the new one.  Then download the paid version of  iPhoto Library Manager, which is now compatible with Mt. Lion, and use it to merge the two libraries into a new, third library.  This will preserve the two libraries in case the merged library isn't to your liking. 
    Here are screenshots of iPLM's coping and merging preferences:
    When you're satisfied that the new, merged libraray is complete and working OK you can delete the two earlier libraries.
    OT

  • Yours sincerely! I just bought a Sony DCR-SD1000 camera only when installing the cd drivers not supported by the operating system Machintosh. I've contacted the seller said the store did not provide for the apple os. How can I move all the files on the ca

    Yours sincerely! I just bought a Sony DCR-SD1000 camera only when installing the cd drivers not supported by the operating system Machintosh. I've contacted the seller said the store did not provide for the apple os. How can I move all the files on the camera the port out is to use a USB data cable to a laptop for my macbookpro can not read the contents of the file and the camera. I also want to use the lens on the camera as a substitute for the embedded camera on my macbookpro, what should I do to replace the embedded camera on macbookpro with sony camera so that the camera could be more variety and can I record when I turned macbookpro . Please help for this so that I can quickly capture the results from sony camera to my macbookpro. Thank you.

    See this page http://macosx.com/forums/networking-compatibility/296947-sony-camcorder-my-mac.h tml - might be some helpful tips there.
    Clinton

  • How can i move all the song from my iPod to my new mac pro laptop?

    how can i move all the song from my ipod touch to my new macbook pro?

    Syncing to a "New" Computer or replacing a "crashed" Hard Drive: Apple Support Communities
      Recovering your iTunes library from your iPod or iOS device: Apple Support Communities

  • Question I have a dilemma . I added a lot of songs in my iTunes now when I synced my ipod this message appear "Elma's ipod cannot be synced because there is not enough free space to hold all the items in the iTunes library (additiona

    I addesd a lot of songs in my itunes, now when I synced my ipod this message appear "elma's ipod cannot be synced because there is not enough free space to hold all the items in the itunes library (additional 382m is required). Then I uncheck a lot of song and synced my ipod again same message appeared. Do I need to buy a new ipod with more memories? Somebody told me to check apply after I unchecked some of the songs but I cannot find the word APPLY. please help I'm not a very technical person.

    The Sync button becomes the Apply button, if you change the iPod's settings in iTunes.  If you are only unchecking songs in the iTunes music library, you click on the Sync button.
    When you select the iPod in iTunes, you see the iPod's Summary screen on the main part of the iTunes window.  There is a checkbox there for Sync only checked songs.  Did you check that checkbox?  If you want iTunes to ignore the songs you unchecked when syncing your iPod, that setting needs to be enabled.  If you change that setting, you'll see the the Sync botton has changed to Apply.  Click Apply.
    That method of unchecking songs works, but it may become annoying over time, as you need to uncheck more and more songs.  If you want advice on some other more convenient ways to make it work, you can post back.

  • My ipod cannot be synced because there is not enough free space to hold all the items in the itunes library(additional 2.35GB required) but it shows 5.85GB free space,  there was no problem until i got a new laptop.

    "The ipod **** cannot be synced becaue there is not enough free space to hold all the items in the itunes library (additional 2.35 GB required)"  but it shows 5.89 GB free. I recently bought a new laptop, and gave away my old one after deleting everything off it, including itunes, the problem started then,

    Hi Terri 4514,
    If you are having a "free space" alert when you try to sync, you may find the following article helpful:
    iOS: "Not enough free space" alert when trying to sync
    http://support.apple.com/kb/ts1503
    Regards,
    - Brenden

  • Why does my ipod no longer play all the items in a playlist?

    Why does my ipod no longer play all the items in a playlist?  I have to go to each item individually to select it as it no longer goes from one item to the next.

    what kind of connection do you have? do you use the ipod 30 pin cable that connects directly to the head unit? it so, maybe you could get help on the alpine site, or a similar site?it could just be a bad connection. you may just have to go oldschool and use rca cables and plug those in...

  • In the Itunes Wishlist there is no price button that you can psuh to buy the items. So I cant buy my whole wishlist without doing it all seperatly and I dont know the total price of all the items. Please help!

    In the Itunes Wishlist there is no price button that you can push to buy the items. So I cant buy my whole wishlist without doing it all seperatly and I dont know the total price of all the items. Please help!

    Both the button and the total cost appear to have been removed in the current version of iTunes - I don't have them either and other people have posted about it as well. You can try leaving feedback for Apple and maybe they'll be added back in a future update : http://www.apple.com/feedback/itunesapp.html

  • Smart form - Long text in all the items?

    Hello gurus,
    We are using something similar to smart form (I don't know the exactly name, like pretty form).
    So, we are using a long text in the "Item text" by item.
    Sometimes the item can be more than 20 lines in the "Item text" as long text and sometimes not.
    Example: I have a PO with 4 items:
    Item 1 - Without Item text.
    Item 2 - With 20 lines in the Item text
    Item 3 -With 1 line in the Item text
    But, when the PO is printed, the PO form has to all the items 20 lines by item.
    That's mean that if in the first item I don't have item text, the first item is showed with a very long space in blank (space of 20 lines).
    The secont item is showed correctly.
    The third item has one line wrote and 19 lines in blank, like a long space in blank.
    How we can manage this situation in the format?
    How we can program these spaces to see in the format to the first item without the space in blank and to the third item only 1 item and the other 19 lines without being shown?
    Can you help me please a.s.a.p.?
    Thanks for your time and I will wait the answer.
    Regards,
    Sandra Palomo

    Hi ,
    Can you please let me know the solution implemented ?

  • How to use csv file to populate all the items in a form

    Our environment - Forms 6i/IAS 9i on Solaris/8.1.6 database on
    Solaris.
    In the web form I want the user to type in the name of an
    existing csv file(which contains 1 record). Then press a button
    and all the items on the form should be populated with the data
    in the csv file.
    One method is load the data in the csv file into the database
    using sqlloader and then execute a query to populate the form.
    Is there another way - instead of loading the file in the databas
    e? Thanks

    Hi Afroz,
    To be more specific, if the csv file doesn't has header, please refer to this script to add header:
    $csv = Import-Csv d:\haha.csv -Header "UserA","UserXYZ","EmailA"
    Then you can loop this csv file to run the "add-mailboxpermission" cmdlet, I recommend you can test this script before running against production environment, please also note I haven't tested this script:
    $csv = Import-Csv d:\users.csv -Header "UserA","UserXYZ","EmailA"
    foreach($each in $csv){
    write-host "assign fullaccess permission of user $($each.UserXYZ) on mailbox $($each.EmailA)"
    get-mailbox -identity $each.EmailA | add-mailboxpermission -user $each.UserXYZ -accessrights 'fullaccess'
    If there is anything else regarding this issue, please feel free to post back.
    Best Regards,
    Anna Wang
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Support, contact [email protected]

Maybe you are looking for

  • ERROR: Module load completed but symbols could not be loaded for Adobe AIR.dll

    Does anyone know what causes this error? The application installed on my machine is using Adobe Air.dll version 2.0.3.13070 This dump file has an exception of interest stored in it. The stored exception information can be accessed via .ecxr. (2b84.29

  • How to create birthday calendar

    Just got iPad and I see the birthday in I calendar but how do I enter birthdays ????

  • BADI CRM_ISA_BASKET_ITEMS adding a new item

    In B2C Webshop, we are trying to use badi CRM_ISA_BASKET_ITEMS to, depending on what is in the customer's shopping basket, add an additional item to the basket.  We are trying to do this on the ABAP side.  I have started by adding the item in method

  • SAP BW Recursive hierarchies

    Hello,     I am wondring if there is such a thing as  "Recursive hierarchies" in BW 3.5 and if so, how do you implement it? Thanks

  • Novell vs. Tally Collector

    While browsing through the various posts in the forum I came across this comment from one of the users that caught my attention: "You can launch the collection editor from the client workstation to perform the inventory using the command line below,