Oops, your profile's looking a bit empty! To help us tailor your experience, please fill in key details like your SketchUp version, skill level, operating system, and more. Update and save your info on your profile page today!
🫛 Lightbeans Update | Metallic and Roughness auto-applied in SketchUp 2025+ Download
Using open-uri or net/http to download a file from web?
-
Hi all!
Can I use open-uri or net/http to download a file from web in SU? -
Re-posting the lost post...
One possibility is to use the built-in SKSocket class in SketchUp. The following snippet might be useful:
def listener(s) $str << s if s == "Connection established" SKSocket.write "GET /RubyLibraryDepot/Ruby/weld.rb HTTP/1.0\r\n\n" end if s == "Connection closed" puts "Done" # Do something useful with the data end end $str = [] if Sketchup.is_online SKSocket.connect "www.crai.archi.fr", 80 SKSocket.add_socket_listener {|e| listener(e)} end -
Could this be used to enforce/update a corporate SketchUp standard installation, I wonder?
Advertisement