AutoLISP commands must be aware that there is a separate AutoLISP stack for each document. This means that AutoLISP variables should be handled in the same way as other per-document global and static data. For more information, see Per-Document Data.
The AcRx::kLoadDwgMsg message in acrxEntryPoint() is sent for each document open when an application is first loaded, and when any new documents are opened while the application is running. The messages are sent from the corresponding document's execution context.