Pages

Plugin: 3D Warehouse Quick Search


Allows the user to enter search terms, and opens a web browser to the search results from within SketchUp.





Instructions
  1. Download 3dw_search.rb
  2. Move the file into your Sketchup/Plugins folder.
  3. Restart SketchUp.
  4. A new item named Search 3DW appears under the Help Menu.
  5. Assign a shortcut key for fast access.

6 comments:

  1. 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

    ReplyDelete
  2. Thanks Daniel, the script has been fixed.

    ReplyDelete
  3. Now is working fine..
    Thank you,
    Daniel S

    ReplyDelete
  4. 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.

    ReplyDelete
  5. jj,

    You're probably right. I always just used a keyboard shortcut and never got around to making a button.

    ReplyDelete
  6. 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..

    ReplyDelete