• Login
sketchucation logo sketchucation
  • Login
⚠️ Libfredo 15.4b | Minor release with bugfixes and improvements Update

Component Axis Display Option

Scheduled Pinned Locked Moved Developers' Forum
9 Posts 3 Posters 203 Views 3 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.
  • K Offline
    ktkoh
    last edited by 26 May 2013, 11:55

    I tried this code from the API in an attempt to find the Option name for controlling the component axis visibility but it does not run. There is a optionsmanager but the options.name line fails.

     model = Sketchup.active_model
     optionsmanager = model.options
     if (optionsmanager)
       # If an options manager is returned, iterate through each option
       # provider within the options manager and display its name.
       for option in optionsmanager
         name = options.name
         UI.messagebox name
       end
     else
       UI.messagebox "Failure"
     end
    

    Is there a code method for controlling the component axis visibility?

    Keith

    1 Reply Last reply Reply Quote 0
    • D Offline
      Dan Rathbun
      last edited by 26 May 2013, 12:26

      It is not in the options manager / provider hierarchy.

      It is in the model or scene page rendering_options hierarchy.

      object.rendering_options["DisplaySketchAxes"]= false
      

      The object can be a Sketchup::Model or a Sketchup::Page instance.

      💭

      I'm not here much anymore.

      1 Reply Last reply Reply Quote 0
      • D Offline
        Dan Rathbun
        last edited by 26 May 2013, 12:30

        OR...

        object.rendering_options["DisplayInstanceAxes"]= false
        

        I'm not here much anymore.

        1 Reply Last reply Reply Quote 0
        • K Offline
          ktkoh
          last edited by 26 May 2013, 15:20

          Dan that code controls the global axis. I am trying to control the individual component axis visibility.

          Keith

          1 Reply Last reply Reply Quote 0
          • T Offline
            thomthom
            last edited by 26 May 2013, 16:07

            Sketchup.active_model.rendering_options['DisplayInstanceAxes'] = true

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

            1 Reply Last reply Reply Quote 0
            • T Offline
              thomthom
              last edited by 26 May 2013, 16:08

              Instead of using messageboxes to inspect the possible options I use these snippets:

              Sketchup.active_model.rendering_options.each { |k,v| puts "#{k} - #{v}" }

              Sketchup.active_model.options.each { |op| puts op.name; op.each { |k,v| puts "> #{k} - #{v}" } }

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

              1 Reply Last reply Reply Quote 0
              • K Offline
                ktkoh
                last edited by 26 May 2013, 23:02

                Thanks that's what I needed. I am always amazed at how quick I get answers on this forum. I would never be able to find these on my own.

                Wouldn't it be nice if the examples in the Sketchup Documentation actually worked.

                Keith

                1 Reply Last reply Reply Quote 0
                • T Offline
                  thomthom
                  last edited by 27 May 2013, 07:27

                  @ktkoh said:

                  Wouldn't it be nice if the examples in the Sketchup Documentation actually worked.

                  +1

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

                  1 Reply Last reply Reply Quote 0
                  • D Offline
                    Dan Rathbun
                    last edited by 27 May 2013, 18:08

                    @ktkoh said:

                    Dan that code controls the global axis. I am trying to control the individual component axis visibility.

                    And if you had read the NEXT post after THAT, before posting you would have seen I gave you the instance key as well.

                    Lesson: Read the whole thread before posting.

                    I'm not here much anymore.

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

                    Advertisement