kInitAppMsg
|
Do register services, classes, AcEd commands and reactors, and AcRxDynamicLinker reactors. Initialize application's system resources, such as devices and windows. Perform all one-time early initialization. AcRx, AcEd, and AcGe are all active. Store the value of the
pkt parameter if you want to unlock and relock your application.
Don't expect device drivers to be initialized, any user interface resources to be active, applications to be loaded in a particular order, AutoLISP to be present, or any databases to be open. Calls involving any of these assumptions will result in an error condition, sometimes fatal. AcDb and AcGi libraries are generally not yet active, although related AcRx and other structures are in place.
|
kUnloadAppMsg
|
Do perform final system resource cleanup. Anything started or created in kInitAppMsg should now be stopped or destroyed.
Don't expect things to be any different from the description of kInitAppMsg. AutoCAD could be mostly dismantled by the time this call is made, except for the libraries listed as active in the kInitAppMsg
Do description.
|
kOleUnloadAppMsg
|
This message should be responded to only by applications using ActiveX Automation on Windows.
Do respond with AcRx::kRetOK, if the application can be unloaded (none of its ActiveX objects or interfaces are being referenced by other applications). If it cannot be unloaded, respond with AcRx::kRetError.
|
kLoadDwgMsg
|
执行与当前图形编辑会话相关的初始化。AcDb、AcGi 和用户界面 API 现在都处于活动状态。未指定是否对图形执行了任何操作。所有 AutoCAD 提供的 API 现在都处于活动状态。此时可以执行 AutoLISP 函数注册,并初始化用户界面。现在要执行的其他操作包括轮询 AutoCAD 驱动程序和查询 AcEditorReactor 事件(如果您希望尽早访问)。acdbHostApplicationServices()->workingDatabase()
不要对每个图形编辑会话执行不希望发生的任何操作。假设每次程序执行多次发送此消息。
|
kUnloadDwgMsg
|
发布或清理为响应 kLoadDwgMsg 代码而启动或注册的所有内容。释放所有AcDb反应器,不包括持久性反应器。
不要释放未绑定到编辑会话的系统资源,也不要清理 AcRx 类、AcEd 反应器或命令;它们在编辑会话中保持有效。
|
kDependencyMsg
|
当其他应用程序依赖于应用程序时,请执行应用程序所需的任何操作,例如锁定应用程序,使其无法卸载。
|
kNoDependencyMsg
|
当不再有任何其他应用程序依赖于您的应用程序时,请执行应用程序所需的任何操作,例如解锁应用程序,以便用户可以根据需要卸载它。
|
kInvkSubrMsg
|
调用注册时使用的函数。通过调用 来确定函数。使用 aceedRetxxx() 返回值。acedDefun()acedGetFuncode()
除了函数调用之外,这里不做太多事情。
|
kPreQuitMsg
|
卸载应用程序控制的任何依赖项(应用程序、DLL 等),以确保在应用程序之前卸载这些依赖项。
|
kEndMsg
kCfgMsg
kQuitMsg
kSaveMsg
|
请考虑使用 AcEditorReactor 事件回调作为响应这些消息的替代方法。
如果要响应通过 AcEditorReactor 进行的等效事件回调,请不要响应这些消息。
|