glTF/DAE to .SKP converter

Hello, dear community!

I’m currently working on an app, and we’d like to add SketchUp support, which means enabling the export to .SKP format for direct model opening in SketchUp. We primarily operate with glTF and .dae (Collada) formats and need to create a script for running the converter on our end. The documentation appears a bit confusing. Can anyone suggest a starting point or provide some ideas on how to implement this?

SketchUp natively supports DAE/Collada import and export.

There are several glTF importer and export extensions available (some free, some paid.)

The SketchUp Ruby API only runs within the SketchUp application in an encapsulated Ruby process.
It is not available for a standalone (system) Ruby process or for 3rd party applications.

You will then need to use the SketchUp C API.

There are examples in the SDK’s "samples" folder that show basic serialization to a SKP file.

Also pay strict attention to the C API introduction page.

Thank you, Dan!
Now it’s a bit cleaner for me. Unfortunately, I’m not very familiar with C, so I’ll consider getting someone with more expertise to handle this task. Have you come across any examples of glTF/DAE deserialization within the SketchUp C API?

I think that there is an example of XML to SKP. This might be valid as I think that glTF text is a custom XML schema.
It is however written as an importer plugin and not as a routine for a 3rd party application. But it still may have parts that are valid.

Also, in the "samples/common" subfolder of the SDK is included C++ library for reading XML files.

1 Like