💡 LightUp 7.1 | SketchUp's only real-time renderer that uses object-based rendering
Download Trial
Batch converting skp files to other formats
-
I'm trying to make a small Ruby script that batch converts .skp files to other formats...
Could someone show sample code on how to open .skp file and then export it as .dae? I tried this but for some reason it's not working (.dae file has different content than original .skp file):
model = Sketchup.active_model model.import "C;/skp_files/example.skp" model.export "C;/dae_files/example.dae"
-
It seems importing an skp file as a component requires user interaction, namely to place it somewhere (Trimble?!?!).
Try this:
model = Sketchup.active_model file = "C;/skp_files/example.skp" Sketchup.open_file(file) model.export(file.sub(/\.skp$/, ".dae"))
Advertisement