sketchucation logo sketchucation
    • Login
    ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info

    Sketchup Constants

    Scheduled Pinned Locked Moved Developers' Forum
    8 Posts 4 Posters 322 Views 4 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • thomthomT Offline
      thomthom
      last edited by

      Is there a list of the various constants Sketchup has defined. Looking at a script I just realised that there's a constant Z_AXIS that defines a vector (0,0,1).

      What other gems are there?

      Thomas Thomassen — SketchUp Monkey & Coding addict
      List of my plugins and link to the CookieWare fund

      1 Reply Last reply Reply Quote 0
      • Chris FullmerC Offline
        Chris Fullmer
        last edited by

        Object.constants.sort
        Also global_variables is interesting.

        I think Jim showed me both of those.

        Lately you've been tan, suspicious for the winter.
        All my Plugins I've written

        1 Reply Last reply Reply Quote 0
        • thomthomT Offline
          thomthom
          last edited by

          Yea, but no that describes what they do?
          And Object.constants.sort also return ALL constants - even them defines by rubys. Don't know how to determine them apart.

          Thomas Thomassen — SketchUp Monkey & Coding addict
          List of my plugins and link to the CookieWare fund

          1 Reply Last reply Reply Quote 0
          • thomthomT Offline
            thomthom
            last edited by

            Also list Class names....

            Thomas Thomassen — SketchUp Monkey & Coding addict
            List of my plugins and link to the CookieWare fund

            1 Reply Last reply Reply Quote 0
            • Chris FullmerC Offline
              Chris Fullmer
              last edited by

              The only way I know of is to unload all rubies and then run it to see what the SU Constants are. And I noticed it lists all classes too. I thought maybe SU declares classes as constants for some reason? Or is that a Ruby feature?

              And to find out what each one does....yeah, no real easy way. But you can type the Constant into the console and see what the constant contains. Some of the constants, VK_UP and all the VK's are described in the API.

              Lately you've been tan, suspicious for the winter.
              All my Plugins I've written

              1 Reply Last reply Reply Quote 0
              • T Offline
                todd burch
                last edited by

                This produces a cleaner report.

                
                Object.constants.sort.join("\n")
                
                
                1 Reply Last reply Reply Quote 0
                • J Offline
                  Jim
                  last edited by

                  Made a list here - I got all the SketchUp constants there, but the RUby constant list is incomplete.

                  Link Preview Image
                  Google Code Archive - Long-term storage for Google Code Project Hosting.

                  favicon

                  (code.google.com)

                  Hi

                  1 Reply Last reply Reply Quote 0
                  • thomthomT Offline
                    thomthom
                    last edited by

                    Thanks Jim.

                    Thomas Thomassen — SketchUp Monkey & Coding addict
                    List of my plugins and link to the CookieWare fund

                    1 Reply Last reply Reply Quote 0
                    • 1 / 1
                    • First post
                      Last post
                    Buy SketchPlus
                    Buy SUbD
                    Buy WrapR
                    Buy eBook
                    Buy Modelur
                    Buy Vertex Tools
                    Buy SketchCuisine
                    Buy FormFonts

                    Advertisement