Data connection between SketchUp and external program

OK, well you can if it will only be a Windows application, use OLE.

For the SketchUp Ruby to OLE side, see:

… and the Ruby Standard library: