I have good knowledge about the Ruby API, can we achieve all those things with C++ too?
I went through the documentation for Sketchup C SDK but didn’t understand much.
@tt_su This would be a good subject for a Developer blog article.
There are still some parity issues between the 2 APIs, see the official SketchUp API Issue Tracker:
SketchUp API Issue Tracker: label(“C API”) label(“parity”)
The introduction page still says …
The SketchUp C API is an interface for reading and writing data to and from SketchUp models. This API interacts directly with SketchUp files (.skp). It can create new ones as well as read or modify existing ones.
However, (for several versions now) it can also be used within the SketchUp application to read “live” models. There was warning not to use the C API functions to change a “live” model, but I’d like to ask @tt_su or @bugra whether this is still generally true or not.
There are examples by the Trimble Team for using the C API for SketchUp extensions …
Thanks for sharing these
The C API within SketchUp itself is still strictly read-only.
The C API used outside of SketchUp can be used to create and modify models.
Generally the C API is used by importers/exporters for for applications looking to handle the .skp file format. Some SketchUp extensions, such as rendering engines, use it to parse the model as quickly as possible since they often have a real time rendering mode that require maximum performance with frequent updates.