以下示例(来自 ObjectARX SDKpolysamp示例程序)说明了如何为注册组和命令的 ObjectARX 应用程序编写需求加载键: void updateRegistry() { // Fill the AppInfo structure with our demand loading details. AcadAppInfo appInfo; appInfo.setAppName("AsdkPolyCAD"); // Application name appInfo.setModuleName(acedGetAppName());// Module path appInfo.setAppDesc("AsdkPolyCAD"); // Description appInfo.setLoadReason(// Specify when we want these to load AcadApp::LoadReasons( AcadApp::kOnCommandInvocation | AcadApp::kOnLoadRequest)); // Write the appInfo to the registry. appInfo.writeToRegistry(); // Write the group name. appInfo.writeGroupNameToRegistry("ASDK_POLYGON"); // Write out all our commands (Global,Local). appInfo.writeCommandNameToRegistry("ASDK_POLY","POLY"); appInfo.writeCommandNameToRegistry("ASDK_DRAGPOLY","DRAGPOLY"); appInfo.writeCommandNameToRegistry("ASDK_POLYEDIT","POLYEDIT"); appInfo.writeCommandNameToRegistry("ASDK_TRANSACT","TRANSACT"); appInfo.writeCommandNameToRegistry("ASDK_HILITPOLY","HILITPOLY"); appInfo.writeCommandNameToRegistry("ASDK_HILITSOLID","HILITSOLID"); appInfo.writeCommandNameToRegistry("ASDK_CREATEINSERT","CREATEINSERT"); appInfo.writeCommandNameToRegistry("ASDK_HILITINSERT","HILITINSERT"); } 注意:对象启用程序使用 ObjectARX 注册表格式的缩写版本。有关更多详细信息,请参阅“对象启用程序”中的“为需求加载注册对象启用程序”部分。
|
|Archiver|CAD开发者社区 ( 苏ICP备2022047690号-1 苏公网安备32011402011833)
GMT+8, 2025-1-8 19:44
Powered by Discuz! X3.4
Copyright © 2001-2021, Tencent Cloud.