0 Replies Latest reply on Dec 19, 2014 5:43 AM by andriichumak

    Resolve anchored object position with ExtendScript

    andriichumak

      Hi,

       

      I think this is a bug in inDesign ExtendScript API. If you try to run "resolve" method on anchored object it would always return you a coordinates relative to object's own left bottom corner.

       

      Steps to reproduce:

      1. Create TextFrame, fill it in with placeholder text.

       

      2. Create a PageItem, for example rectangle.

       

      3. Anchor rectangle anywhere in text.

       

      4. Select rectangle and run the following script:

      app.activeDocument.selection[0].resolve(AnchorPoint.CENTER_ANCHOR, CoordinateSpaces.SPREAD_COORDINATES, false)[0];

       

      I'm expecting to get rectangle's center coordinates relative to spread's coordinates. If I would release anchor and run the same command again - the coordinates are correct.

       

      InDesign CC 2014.1 on Windows 7 pro sp1 x64.

       

      Please, advice how can I get anchored object's center coordinates in spread coordinates system.

       

      Andrii