Connecting to SQLite3
-
Hello:
I have searched around and have not found any information on connecting SketchUp to SQLite3. I was hoping that you-all could point me in the right direction. I'd like to write a ruby script for a pipe flange and rather than input the dimensions of the flange (pipe size, thickness, outside diameter...) I'd like to use SQLite3 to retrieve those values base on the pipe size. So, I'd enter 4" and with that I'd connect and query the database to retrieve the values for the thickness and diameter.
Any ideas or even if something like that is possible within a ruby script?
Thanks
Joe
-
If this was pure Ruby, you would install the sqlite3-ruby gem (http://gemcutter.org/gems/sqlite3-ruby), which requires the sqlite3 header files to compile and a more recent version of Ruby.
I think the only solution for SketchUp is to find a sqlite binary and write wrapper classes around that one (I really doubt that there's a ready solution for that already).
-
@jmjira said:
Hello:
I'd like to write a ruby script for a pipe flange and rather than input the dimensions of the flange (pipe size, thickness, outside diameter...)Thanks
Joe
Sorry can't help with the coding stuff, have you tried engineeringtoolbox.rb
http://sketchup.engineeringtoolbox.com/
or the piping ruby at
both work and are free
john
Advertisement