Recently, I’m using sketchup to support a project. And I hope to find a method that can help me export the model in Sketchup by ruby automatically instead of processing it by hands. While, I looked up on the net but found little bout it. So I wish someone can give me some useful idea.
There are a number of on-line converters, but it appears that they use the Open Asset Import Library. While the library features a lot of input formats, there are only four output formats:
In order to create a Ruby script to export SketchUp geometry in .fbx format, you will need to write your own exporter. This is not as difficult as it sounds, but in this case, the .fbx format is not especially well-documented. However, the ASCII format is somewhat explained here:
it’s relatively easy on your mac using your Pro version of SU…
you will need to manually export the first so that SU registers all of your .fbx options…
are all the files you wish to convert in a single folder?
do they all need to be the same Template i.e. identical style?
if so. Ruby can find the folder, then for each file, import each ‘definition’ into a prepared Template and move it to origin, export to .fbx, delete it, purge unused, import next, rinse and repeat…
If you have a SketchUp Pro edition, over the years, there have been quite a few postings of batch folder export of model files using the various Pro exporters supported by the SketchUp Ruby API’s Sketchup::Model#export method.
You’ll find the posts here or at the SketchUcation forums.