5 Replies Latest reply on Feb 5, 2013 3:04 AM by [Jongware]

    moving objects and their increments

    eubean525 Level 1

      Hello,

      I'm on a Mac OS 10.8.2 with InDesign CS6.

       

      I created a complicated pattern using several small icons in a small grouping and repeated the grouping many times for a book liner. With the amount of steps it took, all the increments I used in "Move Object" were varied and I don't know the numbers any longer. Unfortunately, I forgot to place a logo into the single groups that must repeat in the pattern. It's a logo that I need to place within each grouping.

       

      After the pattern was already completed, I placed the logo in a desirable location within one grouping of icons. To create the original pattern, I offset each grouping by a vertical/horizontal number I no longer remember. I need to repeat the "Logo" within all these repeated groupings accurately. Since I don't remember the vertical and horizontal increments for "Move Object," I'm dragging copies of the logo manually, hoping that the xy increments would show up somewhere in an info window to give me an approximate xy axis to copy and repeat the logo so it sits within the groups in the same location. Since, in the window under Object/Transform/Move, the xy increments don't change when you move an object, is there a way to drag an object and have the new increments show up so I can place them into the Move Object panel? That way I can use the increments based on simply draggin an object from one spot to another.

       

      I hope this is clear. Below is a  simplified illustration of what I am trying to do. The shapes in each grouping are already in place. Is there a way I can accurately copy and move "Logo" to sit in the same spot within the next grouping?  And so it's clearer, there are about 300 groupings to place the logo within.

       

      Thanks for your patience and help.

       

      Pattern Example.jpg

        • 1. Re: moving objects and their increments
          Peter Spier Most Valuable Participant (Moderator)

          Select one grouping (or one object in a grouping) and note it's coordinates. Then select the corresponding next grouping or object and not it's coordinates. Cubract the first valus from the secon and that's waht you need to enter into Step and Repeat.

          • 2. Re: moving objects and their increments
            [Jongware] Most Valuable Participant

            Is it enough to know the delta x and y between two successive copies of the same object? (Say, the top left medium gray rectangle.) If so, you can retrieve the delta values with a simple Javascript:

             

            if (app.selection.length == 2)
                      alert ("dx is "+(app.selection[0].geometricBounds[1]-app.selection[1].geometricBounds[1])+
                                 ", dy is "+(app.selection[0].geometricBounds[0]-app.selection[1].geometricBounds[0]) );
            else
                      alert ("Please select 2 same or similar objects");
            

             

            Save this as "showDelta.jsx" in your User Scripts folder. Select two same objects, then double-click the script to run. It will show you an alert, like this, in your current measurement units:

             

            Screen Shot 2013-02-05 at 12.16.04 AM.png

             

            Then select the new object ("LOGO"), and enter these measurements into Step and Repeat, along with a repeat value.

             

            Note that the sign of the deltas may be off -- in this case, to go Right and Down, both deltas ought to be positive instead of negative. That's because ID doesn't "know" the order of selection, but rather uses an internal object counter to determine relative order of objects.

            • 3. Re: moving objects and their increments
              eubean525 Level 1

              Both of these responses are great. I will keep this info forever.

               

              Sincere thanks to Peter and Jongware.

              • 4. Re: moving objects and their increments
                Laubender Adobe Community Professional & MVP

                That's because ID doesn't "know" the order of selection, but rather uses an internal object counter to determine relative order of objects.

                 

                @Jongware – Just as a side note: that's true for at least InDesign CS3 (?), CS4 and CS5.

                However, with InDesign CS5.5 and CS6 that changed:

                 

                If you  select two objects one after another by shift+click, app.selection[0] will always be the first object and app.selection[1] will be the second one.

                 

                See:

                http://tomaxxi.com/2011/04/selection-order-is-back-in-cs5-5/

                 

                Uwe

                • 5. Re: moving objects and their increments
                  [Jongware] Most Valuable Participant

                  Laubender wrote:

                   

                  That's because ID doesn't "know" the order of selection, but rather uses an internal object counter to determine relative order of objects.

                   

                  @Jongware – Just as a side note: that's true for at least InDesign CS3 (?), CS4 and CS5.

                   

                  Ah! I tested with CS4 (which on my Mac has a custom Golden icon ) and couldn't get the order right, so I figured this was the reason. I *do* remember the complaints from scripters when this stopped working; good to know it only took 3 full versions to fix it ...