What I posted in #17 solved my problem. Thanks to all.
Some of the frustration (and strangely enough the fun) with programming is that some things don't make sense.
For example, why have a LockDocument but not an UnLockDocument? "Dispose" certainly isn't intuitive even in the context of C# programming.
And why is it you create a DocumentLock object by calling LockDocument? Shouldn't it be ThisDrawing.DocumentLock()?
And if we are stuck with LockDocument why not make it a property? LockDocument(bool LockIt).
Then we can just call it:
ThisDrawing.LockDocument(true);
// do my stuff here
ThisDrawing.LockDocument(false);
:realmad: :ugly:
Ok, I feel better now.