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 Class: UI::Toolbar â SketchUp Ruby API Documentation
or Class: UI::Toolbar â SketchUp Ruby API Documentation
And also to see if itâs visible consider Class: UI::Toolbar â SketchUp Ruby API Documentation
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.
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 tag