5 Replies Latest reply on Aug 27, 2014 6:06 AM by A. Patterson

    Getting Perspective Grid grid specifications

    minimum99 Level 1



      Normally you can get various pref parameters via AIPreferenceSuite, but Perspective Grid settings uses its own preference file and there is no API for getting to it. Anyone know how to get the  Perspective Grid settings such as gridline spacing for currently active grid?

        • 1. Re: Getting Perspective Grid grid specifications
          Blyskawica Level 3

          The Perspective Grid parameters are stored in the document dictionary. Here are the keys and their types:


          PerspectiveGrid_CellCount [Real]

          PerspectiveGrid_CellSize [Real]

          PerspectiveGrid_FloorBlue [Integer]

          PerspectiveGrid_FloorGreen [Integer]

          PerspectiveGrid_FloorOffset [Real]

          PerspectiveGrid_FloorOpacity [Real]

          PerspectiveGrid_FloorPlaneVisibilityState [Integer]

          PerspectiveGrid_FloorRed [Integer]

          PerspectiveGrid_HorizonHeight [Real]

          PerspectiveGrid_LeftBlue [Integer]

          PerspectiveGrid_LeftExtent [Real]

          PerspectiveGrid_LeftFaceAngle [Real]

          PerspectiveGrid_LeftGreen [Integer]

          PerspectiveGrid_LeftOpacity [Real]

          PerspectiveGrid_LeftPlaneBottomPoint [Point]

          PerspectiveGrid_LeftPlaneCellExtent [Point]

          PerspectiveGrid_LeftPlaneTopPoint [Point]

          PerspectiveGrid_LeftPlaneVisibilityState [Integer]

          PerspectiveGrid_LeftRed [Integer]

          PerspectiveGrid_LeftVanishingPoint [Point]

          PerspectiveGrid_RelativeFloorVanishingPoint [Point]

          PerspectiveGrid_RightBlue [Integer]

          PerspectiveGrid_RightExtent [Real]

          PerspectiveGrid_RightFaceAngle [Real]

          PerspectiveGrid_RightGreen [Integer]

          PerspectiveGrid_RightOpacity [Real]

          PerspectiveGrid_RightPlaneBottomPoint [Point]

          PerspectiveGrid_RightPlaneCellExtent [Point]

          PerspectiveGrid_RightPlaneTopPoint [Point]

          PerspectiveGrid_RightPlaneVisibilityState [Integer]

          PerspectiveGrid_RightRed [Integer]

          PerspectiveGrid_RightVanishingPoint [Point]

          PerspectiveGrid_RulerOriginIndexFirst [Integer]

          PerspectiveGrid_RulerOriginIndexSecond [Integer]

          PerspectiveGrid_Scale [Point]

          PerspectiveGrid_StationPoint [Point]

          PerspectiveGrid_Type [Integer]

          PerspectiveGrid_Unit [Integer]

          PerspectiveGrid_ViewingDistance [Real]

          • 2. Re: Getting Perspective Grid grid specifications
            minimum99 Level 1

            Thank you very much for this list. Where did you find this list? Are there more constants, since I am looking for various constants that are not in this list for ex: gridline spacing

            • 3. Re: Getting Perspective Grid grid specifications
              minimum99 Level 1

              Got it, tried CellCount and it gave the grid spacing. So I am good and thank you again.

              • 4. Re: Getting Perspective Grid grid specifications
                Blyskawica Level 3

                You're welcome. The dictionary key list was obtained using Andrew Patterson's Debug Dump Tool, or you can just iterate through the document dictionary yourself.

                • 5. Re: Getting Perspective Grid grid specifications
                  A. Patterson Level 4

                  This is funny, but I saw the post about this yesterday and tried to fire up Illustrator to use that very tool to do what what you did Blyskawica, but it was not through the debugger and almost immediately I realized I couldn't see the output!


                  I was in the middle of development on something unrelated so I couldn't fire it up and look for myself, so I'm glad someone did!