Doing this externally to SketchUp is called “headless mode.” But I don’t think the SDK has all the bells and whistles, re: geometry cleanup, etc. It definitely does not have the editing tools.
There have been ppl who have come looking for this in the past. They basically did not like the SketchUp UI, and wanted to wrap the SKP engine within their own GUI.
Doing it from within SketchUp… Thomas has told me most of the engine’s functions are written to assume the active model as the target, and that some (most?) of the functions do not even allow passing a model reference into them. Ie, they are hard-coded to act upon the active model. (Which is why we we are not yet given an API models collection that has non-active model references.)
So, I think it will be difficult to impossible to have API methods act upon an external model or it’s objects.
[scratching head in bemusement] SketchUp already does this quite well. Both manually and per-extensions.
Processing extra models, in the same process as SketchUp, means they’d have to share memory with the active model.
Now that is not to say that a better layer import function would be nice. I see that the C API has a function to get a layer’s material. If that material’s texture and properties could be extracted and used to assign to the new layer in the active model, that’d be a step forward for sure.
I have also thought about command line tools, that could do some batch work on skp files. I’m sure there is some people that’d find that useful.