5 Replies Latest reply on May 11, 2008 12:25 PM by (Dmitry1776)

    Can i nudge textframe in other way?

      Now i use this:
      b mBnds = mTextFrame.GeometricBounds

      b mTextFrame.GeometricBounds = Array(mBnds1(0) + 5, mBnds1(1) + 5, mBnds1(2) + 5, mBnds1(3) + 5).

      Ii there another way to shift/nudge an object? Or it's right way?
        • 1. Re: Can i nudge textframe in other way?
          Level 1
          Sub Move([To], [By])
          Member of InDesign.TextFrame
          Moves the TextFrame to a new location. Note: Either the 'to' or 'by' parameter is required; if both parameters are defined, only the to value is used. / To: The new location of the TextFrame,in the format (x, y). as Array of 2 Units (Doubles or Strings), Spread, Page or Layer / By: The amount (in measurement units) to move the TextFrame relative to its current position, in the format (x, y). as Array of 2 Units (Doubles or Strings)

          or you can play with Transform (new in CS3)

          Sub Transform(In As idCoordinateSpaces, From, WithMatrix, [ReplacingCurrent], [ConsideringRulerUnits As Boolean = False])
          Member of InDesign.TextFrame
          Transform the page item / In: The coordinate space to use / From: The temporary origin during the transformation as Array of 2 Doubles, idAnchorPoint enumerator or Array of Arrays of 2 Doubles, idCoordinateSpaces enumerators, idAnchorPoint enumerators, idBoundingBoxLimits enumerators or Long Integers / WithMatrix: Transform matrix as Array of 6 Doubles or TransformationMatrix / ReplacingCurrent: Transform components to consider; providing this optional parameter causes the target's existing transform components to be replaced with new values. Without this parameter, the given matrix is concatenated onto the target's existing transform combining the effect of the two as idMatrixContent enumerator, Array of idMatrixContent enumerators or Long Integer / ConsideringRulerUnits: If true then a ruler based origin is interpreted using ruler units rather than points. The default value is false. This parameter has no effect unless the reference point is specified relative to a pa
          ge.

          robin

          --
          www.adobescripts.com
          • 2. Re: Can i nudge textframe in other way?
            Level 1
            Well, i tryed to move frame (for example) by 10 mm rigt and 10 mm down.

            b mTextFrame.Move (10, 10)
            mTextFrame.Move [10, 10]
            mTextFrame.Move ([10, 10])
            mTextFrame.Move ([by 10, 10])
            mTextFrame.Move ([by array (10, 10)])
            and so on...

            And everytime get err message ("external name not defined"). Where is mistake?
            • 3. Re: Can i nudge textframe in other way?
              Level 1
              call myTF.Move (Array(10,10))

              robin

              --
              www.adobescripts.com
              • 4. Re: Can i nudge textframe in other way?
                Level 1
                Hi Dmitry1776,

                Rem Move To
                mTextFrame.Move Array(10,10)
                Rem Move By (note empty first parameter)
                mTextFrame.Move , Array(10,10)
                Rem Move to another page (given a page reference "myPage")
                mTextFrame.Move myPage

                If these do not work, it's because you're using the unpatched version of InDesign CS2 (you didn't say which version you have)--install the latest update, and it'll be fine.

                Thanks,

                Ole
                • 5. Re: Can i nudge textframe in other way?
                  Level 1
                  Yessss! Now it works (i've Indi CS3). Thanks, Olav.