Open my Toolbar when launch Sketchup?

Hello everyone. Is there a way to always open my Toolbar when i launch sketchup even if i hide the toolbar before close de Sketchup ?

Try http://ruby.sketchup.com/UI/Toolbar.html#restore-instance_method
or http://ruby.sketchup.com/UI/Toolbar.html#show-instance_method
And also to see if it’s visible consider http://ruby.sketchup.com/UI/Toolbar.html#visible%3F-instance_method

1 Like

Already try that, but it is hidden so the toolbar.restore doesn’t work. Also toolbar.show is not working when the toolbar is closed
I’m new on Ruby Sketchup so maybe i am doing something wrong…

what is your current toolbar code?

john

Please don’t do this. If the user has closed the toolbar it should remain closed until the user chooses to show it. There are all kinds of reasons for hiding a toolbar, ranging from only using the extension every now and then and having it hidden the rest of the time to using it all of the time and instead relying on shortcuts.

3 Likes

def ferramentas_gratuitas

toolbar = UI::Toolbar.new “Freire Project 3D”

cmd = UI::Command.new(“Bem Vindo!”) { tela_de_login }
cmd.small_icon = File.join(File.dirname(FILE), “imagens”, “logo_freireproject.png”)
cmd.large_icon = File.join(File.dirname(FILE), “imagens”, “logo_freireproject.png”)
toolbar.add_item cmd

toolbar.add_separator # LINHA DE SEPARAÇÃO

cmd = UI::Command.new(“Rotacionar Objeto X 90º”) { rot_90(“vermelho”) }
cmd.small_icon = File.join(File.dirname(FILE), “imagens”, “icone_image_rotacao_X.png”)
cmd.large_icon = File.join(File.dirname(FILE), “imagens”, “icone_image_rotacao_X.png”)
cmd.tooltip = “Rotação 90º - X”
cmd.status_bar_text = “Gira o objeto em 90º de X”
toolbar.add_item cmd

cmd = UI::Command.new(“Rotacionar Objeto Y 90º”) { rot_90(“verde”) }
cmd.small_icon = File.join(File.dirname(FILE), “imagens”, “icone_image_rotacao_Y.png”)
cmd.large_icon = File.join(File.dirname(FILE), “imagens”, “icone_image_rotacao_Y.png”)
cmd.tooltip = “Rotação 90º - Y”
cmd.status_bar_text = “Gira o objeto em 90º de Y”
toolbar.add_item cmd

toolbar.show

end

OBS: Some descriptions are in Portuguese.

Please format your code properly.
As it is it’s unreadable.
Use the image tag

1 Like