Allows the user to enter search terms, and opens a web browser to the search results from within SketchUp.
Instructions
- Download 3dw_search.rb
- Move the file into your Sketchup/Plugins folder.
- Restart SketchUp.
- A new item named Search 3DW appears under the Help Menu.
- Assign a shortcut key for fast access.
6 comments:
Hi Jim,
The ruby console send me this error when i start sketchup:
Error Loading File 3dw_search.rb
undefined method `file_loaded?' for JNF:Module
Any idea?
Daniel S
Thanks Daniel, the script has been fixed.
Now is working fine..
Thank you,
Daniel S
Wouldn't this tool be better if it was a toolbar? It would be something like the google-search toolbar in your browser, only now a model-search in Sketchup. I think it would be faster and easier to use. Good luck.
jj,
You're probably right. I always just used a keyboard shortcut and never got around to making a button.
hi Iam trying to download several plugins, but when Clic in download it show me this: # 3dw_search.rb
# Copyright (c) 2006 jim.foltz
# http://sketchuptips.blogspot.com
require "sketchup.rb"
def search3d
terms = UI.inputbox(["Include Terms", "Exclude Terms"], ["", ""], "Search 3d Warehouse")
return unless terms
t1, t2 = terms
t1.strip!
t1.squeeze!(" ")
t2.strip!
t2.squeeze!(" ")
t1 = t1.split.join("+")
t2 = t2.split.map{|e| "-"+e.to_s}
t2 = t2.join("+")
terms = t1 + "+" + t2
url = "http://sketchup.google.com/3dwarehouse/search?q="
UI.openURL("#{url}#{terms}")
end
fn = "3d_seach.rb"
unless file_loaded? fn
UI.menu("Help").add_item("Search 3DW") { search3d }
file_loaded fn
end
(and I dont know thats for?)
thats for all ruby..
Post a Comment