# Copyright 2008, Engineering ToolBox # This software is provided as a part of the Engineering Toolbox Google Sketchup # application. # Permission to use, copy, modify, and distribute this software for # any purpose and without fee is hereby granted, provided that the above # copyright notice appear in all copies. # THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR # IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. #----------------------------------------------------------------------------- require 'sketchup.rb' #----------------------------------------------------------------------------- def create_dialog dlg = UI::WebDialog.new("Engineering ToolBox", true, "", 1000, 800, 150, 150, true); dlg.set_url "http://sketchup.engineeringtoolbox.com/" dlg.show dlg.add_action_callback("insert") {|d,p| eval(p) } end if( not file_loaded?("engineeringtoolbox.rb") ) add_separator_to_menu("Plugin") UI.menu("Plugin").add_item("Engineering ToolBox") { create_dialog } end #----------------------------------------------------------------------------- file_loaded("engineeringtoolbox.rb")