TheSwamp
Code Red => .NET => Topic started by: GUIDO ROOMS on August 13, 2012, 07:21:07 AM
-
Just found out that if I try to switch the active document from a modal dialog I get this error.
CommandFlags.Session is no help.
Locking documents is no help.
The dialog has to be modeless, in this case everything works.
Well, let's hope I'm right.
Loving Autodesk more and more each day.
To the blockheads who've written those docs: things like that should be *prominent* in the documentation
and should not be left to be inferred by trial and error.
-
Maybe this code help you:
Application.DocumentManager.DocumentActivationEnabled = true;
-
Thanks a lot Alexander.
This works.
Saves my day.
-
Maybe an interesting remark:
Since in the dll I'm currently writing, all dialogs will be executed modally,
I tried to be clever and put the line Application.DocumentManager.DocumentActivationEnabled = true;
in Initialize(), but that doesn't work.
Thanks again for your reply.
-
Maybe an interesting remark:
Since in the dll I'm currently writing, all dialogs will be executed modally,
I tried to be clever and put the line Application.DocumentManager.DocumentActivationEnabled = true;
in Initialize(), but that doesn't work.
Thanks again for your reply.
That is because runing modal dialog disable document activation and you have to enable activation just before switching documents.