Is there a toolbar button for weld?
-
I use this a lot myself, probably my 2nd most used ruby.
Mirror is by far the one I use most.I would use the button.
-
If you have weld.rb installed, this will make a toolbar. You'll need icons also - one 24x24px, the other 16x16px. See the code for the names of the image files.
# weld_tool_button.rb pf = Sketchup.find_support_file("Plugins") if File.exists?(File.join(pf, "weld.rb")) cmd = UI;;Command.new("Weld") { join_edges } cmd.tooltip = "Weld" cmd.status_bar_text = "Weld" cmd.large_icon = File.join(pf, "weld_lg.png") cmd.small_icon = File.join(pf, "weld_sm.png") tb = UI;;Toolbar.new("Weld") tb.add_item(cmd) cmd = tb = pf = nil end
-
you can also make a shortcut
It will be more speedy in use than a tool bar -
The following toolbar has a weld icon
Ken
-
Dear Jim,
Thank you for replying so quickly. Do I insert the program snippet into the text file for weld.rb, and if so, at what point should it be inserted? At the end?
Presumably, the image files weld_lg.png and weld_sm.png would go in the plugin folder. Ideally, the images would go in to a separate folder called Weld, keeping everything together and well annotated. How could that be done?
Thanks Ken! I know of the SCF Powerbar, but I would like just the one button.
Pilou, yes you are right! A short cut would be quicker, but I rather like the idea of a button.
Kind regards,
Bob -
Probably the path would be something like
"Weld/weld_lg.png" "Weld/weld_sm.png"
I hope SM is not for sado-mazo
-
No, that s a stand-alone script. create a file named weld_toolbar.rb and paste the code in.
The toolbar will work without the images, but the buttons will be blank.
Gaieus is correct, if you want the images in a folder named weld, change these lines:
cmd.large_icon = File.join(pf, "weld", "weld_lg.png") cmd.small_icon = File.join(pf, "weld", "weld_sm.png")
-
Hear, hear? I am correct!
So Jim, what should my first plugin be? -
@unknownuser said:
you can also make a shortcut
It will be more speedy in use than a tool barI use the shortcut J[oin] as it's the same in CAD... AND very quick - the N[o] key is just below it to cancel the dialogs too...
-
Thanks to all!
-
Advertisement