Unique id of the Model?

Hi all, is there anyway to get a unique id for the model? GUID information of the model changes each time I have modified and save the SKP file. I need a persisted one. Thanks!

Does this solves your issue?

but this is strange, guid should be persistent. I have used them for a long time.

Thanks for your answer. Model cannot cast to Entity object so I cannot use persistent id. GUID is persistent as long as you don’t modify the content of the SKP file. I’m using SDK C API btw.

This is true and as it is designed. When the model changes, it is no longer the same model.

Your extension would have to generate it’s own GUID and save it into an AttributeDictionary attached to the model.

Out of curiosity, what happens when you change something but then revert it without saving, so the model is once again in the exact state it was before the reverted edit? Does the GUID persist?

I agree but I’m not doing this in the SketchUP side. I use the SDK in a standalone app. We don’t want to modify the SKP file as you suggest by adding entiry to the AttributeDictionary. Any solution in these conditions will be appreciated.

We’re not interested that circumstance but anyway I’ve tried modifing a component and save the SKP file and then undo my changes and saved again. GUID doesn’t revert back to the first one. The answer is no. It doesn’t persist.

Yeah, I figured it would change after a save, but my question was if it changes (or not) if you don’t save before reverting?

Got it. We are not interested live interaction with Sketchup just for offline SKP files. So, beats me.