Problem with SUModelRelease

Hi there,

I’m working on a project using the Skectchup C API. I have a .skp file from which I create two differents models using SUModelCreateFromFile.

The problem is, when I release the first model (using SUModelRelease), it seems that the second model is corrupted, and I get a crash when I attempt to use one of the definitions it contains.

Is this an expected behavior? Do both models share the same definitions or something? Is there a workaround to this issue?

I can give more details if something is unclear. Thanks for your help!

What release version of the API is reading the files ?

What version of the API or SketchUp wrote the files ?

Show a code snippet of how you define these API model objects.

FYI … if available SUModelCreateFromFileWithStatus is preferred over SUModelCreateFromFile.

Nevermind, I’ve been messing in my code with static variables, so one of them is not updated when I change models, thus I have a variable containing an SUComponentInsrtanceRef relative to a model who has been released…

Sorry for opening a topic about that…


No problem. Thank you for describing the reason. (Please mark topic as solved.)