Well, if you play around with Sketchup enough, you can answer your own questions. I think I did it. I just put my Sketchup.active_model.select_tool() command with a UI.menu. Did I do this right?
**UI.menu("Tool").add_item("my tool") {
Sketchup.send_action "showRubyPanel:"
Sketchup.active_model.select_tool(My_Tool.new)
}
class My_Tool
def activate
puts "My tool has been activated"
end
def deactivate(view)
puts "My tool has been deactivated."
view.invalidate if @drawn
end
def onMouseMove(flags, x, y, view)
puts "onMouseMove: flags = " + flags.to_s
puts " x = " + x.to_s
puts " y = " + y.to_s
puts " view = " + view.to_s
end
def onLButtonDown(flags, x, y, view)
puts "left mouse button clicked."
end
def onLButtonUp(flags, x, y, view)
puts "left mouse button released."
end
end #end of class My_Tool
~**