For what I imagine are the very few people who have written extensions that save their state into sessions and that restore their own models from sessions, you should know that I have added a variable to the SimpleSession module named "modelOffset".  During a normal session restore, modelOffset is zero.  During a session restore where pre-existing models haven't been closed (i.e. the session is being "merged" with the current models) modelOffset is a positive integer that should be added to restored model IDs (not sub-IDs) to avoid collision with currently-open models.  This is explained in further detail in the Programmer's Guide example for sessions:

http://www.cgl.ucsf.edu/chimera/docs/ProgrammersGuide/Examples/Main_SessionSave.html

Let me know if anything is unclear...

--Eric


                        Eric Pettersen

                        UCSF Computer Graphics Lab

                        pett@cgl.ucsf.edu

                        http://www.cgl.ucsf.edu