4 Replies Latest reply on Oct 7, 2016 12:55 AM by Loic.Aigon

    Rotate spread view to 90˚

    johnp45247251 Level 1

      Hi everyone!

       

      How to rotate spread view for the first page in indesign using applescript.

       

      Screen Shot 2016-10-06 at 10.49.53 AM.png

       

      Please help me anyone!

       

      Thanks,

      Peter.

        • 1. Re: Rotate spread view to 90˚
          [Jongware] Most Valuable Participant

          I expected this to be a Spread method or property, but it does not appear in my InDesign's Object Model (CS4), and also not in more modern versions: InDesign CC2015 ExtendScript API: Spread

           

          A CC 2015 Spread has a generic 'preferences' property, which may contain something of use. However: they* forgot to say what preferences it contains!

           

          Quite important: I cannot find anything containing the word 'rotate', '90', '270', or 'clockwise' anywhere related to Spreads (or even "Pages").

           


           

          * they = the Adobe programmers. The code for InDesign contains functions that perform actions on internal objects. To make such an action or property available for scripting, they need to expose it to the scripting interface – a definition that describes, on the one hand, what function/action/object in the actual code is targeted, and on the other hand, what it is called in the Scripting environment.

          • 2. Re: Rotate spread view to 90˚
            Loic.Aigon Adobe Community Professional

            However you may think of evoking the menu.

            1 person found this helpful
            • 3. Re: Rotate spread view to 90˚
              johnp45247251 Level 1

              Thanks for your help...

              I got that code.

              This code is helped for me.

               

              tell application "Adobe InDesign CS6"

                  set myRotateMatrix to make transformation matrix with properties {counterclockwise rotation angle:-90}

                  tell spread 1 of document 1

                      select all page items

                      transform item 1 in spread coordinates from center anchor with matrix myRotateMatrix

                  end tell

              end tell

              • 4. Re: Rotate spread view to 90˚
                Loic.Aigon Adobe Community Professional

                Hi,

                 

                Be aware that you actually transformed the page object when the rotation options in the pages panel is only a visual tool.

                 

                Loic