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

    UI.set_toolbar_visible

    Scheduled Pinned Locked Moved Developers' Forum
    8 Posts 5 Posters 450 Views 5 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.
    • Chris FullmerC Offline
      Chris Fullmer
      last edited by

      Hi, I'm learning, so go easy on me. (I'll probably need to preface every post of mine here the ruby forum forever, or you could just remember that and I'll quit posting it πŸ˜„ )

      So I am playing with the UI.set_toolbar_visible .....method?....... And I have gotten it to work. I can close and open toolbars as I see fit. But there are 4 toolbars that don't seem to be control-able.

      Large Tool Set
      Layers
      Measurements
      Shadows

      So I'll attempt to post my code. 😳

      toolbar_names_counter = 0
      
      UI.toolbar_names.each do 
      	name = UI.toolbar_names[toolbar_names_counter]
      	is_visible = true
      	status = UI.set_toolbar_visible name, is_visible
      	toolbar_names_counter = toolbar_names_counter +1
      end
      

      So that should go through and turn on every toolbar (I think). But it never opens the four I listed.

      So then I found UI.toolbar_names. I type this into the ruby console:

      puts UI.toolbar_names
      

      and I get this output:

      Standard
      Principle
      Camera
      Drawing
      Edit
      Construction
      Walk
      DisplayMode
      StandardViews
      Section
      Google
      GettingStarted
      VCB
      

      Apparently those 4 toolbars are just not listed in the UI.toolbar stuff. Is there a way to access the unlisted toolbars?

      Thanks,

      Chris - sorry such a long post for something probably trivial.

      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

        Wonder if they are special elements. Layers, Measurements and Shadows contains custom content, not just toolbar buttons. Might be why. Not sure why Large Tool Set won't list.

        hm... you'd think there's be an toolbars enumerable available...

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

        1 Reply Last reply Reply Quote 0
        • J Offline
          Jim
          last edited by

          It could be called a bug, or there may be other reasons the 4 toolbars are not listed using the "toolbar_names" method. Probably the only ones who can answer that are the developers.

          Hi

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

            Darn, that's what I was afraid of. I was hoping that I just missed something because I have no clue what I'm doing. There goes my dreams for a new toolbar manager ruby πŸ˜„

            Chris

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

            1 Reply Last reply Reply Quote 0
            • scottliningerS Offline
              scottlininger
              last edited by

              Hey guys,

              I've filed a bug. If any old-timers remember seeing this one from the years of yore, please let me know.

              Thanks, Chris!

              Cheers,

              • Scott Lininger
                SketchUp Software Engineer
                Have you visited the Ruby API Docs?
              1 Reply Last reply Reply Quote 0
              • T Offline
                todd burch
                last edited by

                I think I've seen it. I believe there is also still a Mac-specific bug related to this, where the first 4 characters of the toolbar names are truncated.

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

                  Is there a way that I could write a script that controls the visibility other people's toolbars? Umm, for example, is there a method that will return ALL loaded toolbars, not just the default listed ones, but ALL that have been loaded by other rubies? Thanks,

                  Chris

                  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

                    http://forums.sketchucation.com/viewtopic.php?f=180&t=21156

                    Just linking various related threads together for other people looking for the same topic.

                    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