thomthom / bezier-surface

Bezier Surface Editor for SketchUp
https://extensions.sketchup.com/en/content/bezier-surface
MIT License
10 stars 1 forks source link

Reliable way of mapping editor to model #45

Open thomthom opened 11 years ago

thomthom commented 11 years ago

Original report by me.


http://sketchucation.com/forums/viewtopic.php?f=180&t=43219&p=484242#p484242

Yes, I believe that would work fine. However, I recommend using the Entity member entityID instead, like this: Sketchup.active_model.definitions.entityID. This one also doesn't persist between sessions, but it is a unique index across all entities Sketchup has loaded (even with multiple models), and active_model.definitions is a SketchUp entity.

So under OSX this returns a new integer for each model opened. But under Windows it returns the same integer even if you open or create a new model. It appear to reuse the DefinitionList entity.