I read about this a few times, but I did not think that my application would actually have to deal with this issue until yesterday, when I also got the error message about undomarks which where deleted during some operation in my application.
As far as I can see, I am not closing any parts while the application is running. All I am doing is to iterate though all parts in an assembly, declaring each one as the workpart and doing some operations. Does this already count as closing the part? Or can this error also occur while cycling through an assembly?
If so, is there maybe a workaround? I already read about having a "dummy" part open all the time to avoid the clearing of undo marks, but since I just cycle through the parts, there is no point without an open part.
All the operations I perform are done within the ok callback, if this is of any help.
I hope somebody may have an idea, as I am starting to get nervous about this problem
I am making a wild guess because I cant able to access your code. This may work, Don't change the workpart when your GUI is loaded. Read the info from the UI. let the UI unloads and change your workpart or do whatever you want. This is one of the standard practices Which I follow.
Let us know whether this helps.
Thank you very much for your reply @Irfan23 !
I tried several other things in the last week, and I think that your suggestion might be the right thing to do. Unfortunately I am new to the concept of unloading the UI, loading a part and loading the UI again.
Can you maybe help me on how to perform this operation? Or give me a hint on which commands I have to use to do so?
I am looking forward to hearing from you and thank you in advance!
From your previous post, I predict that you are calling some method inside OK or Update Callback, which changes the part. Dont do that. Collect the information UI and Store in a container. Once OK CB executes control goes back to main method. Now get the information from the container and change your Workpart from there. I am making random guess. Give a shot.