Toolkit VC++ : How to Refresh the Session? Any help would be greatly appreciated.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Toolkit VC++ : How to Refresh the Session? Any help would be greatly appreciated.
Need to remove a drawing model from session.
I used ProWindowDelete/ ProWindowCurrentClose to close the Drawing model's window.
Then ProMdlErase to erase it from memory.
But I still get that drawing model in ProSessionMdlList.
If I use ProMdlEraseNotDisplayed to erase it from session then it gives me error. ( may be because model was already erased)
Please let me know is there any way
to refresh the Session? or
forcefully remove the model from session?
Any help would be greatly appreciated.
Warm regards,
Madhavi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Give a try with below API sequence and update whether it is working or not:
ProWindowCurrentClose
ProMdlEraseAll
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thanks for reply.
But that does not work
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
I came to know fantastic fact from toolkit documentation and might be helpful to you.
Once we use any API related to model erase, it does erase from memory once control is passed to Creo after execution of all toolkit command. If your work flow is not as per above statement, there might be memory issue.
HIH
Ketan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
As far I know, you can’t change the current model in a synchronous session. Try to open a object from disk, this one you can change, save and erase if you are done,