I put together an example for getting a list of entities out of curiosity and a desire to learn. It is posted on GitHub.
The code is fairly straightforward - I used a few standard containers like
vector but the code is otherwise all functions - I did not use many c++ features like classes. I may add c++ classes at some point but I wanted to understand the SDK at the lower level also. Besides I’ve heard there may be a couple c++ wrappers already in the works.
The executable is a command line app that takes a .skp file name as the only input and just lists the model’s entities. This would be similar to the Ruby
One question I have is how to handle errors when calling the
SU* functions? I know c++ had exceptions but it’s not clear how best to handle all the function calls that could go wrong throughout the file in a unified way. I am not even checking return values at this point.