caa插件的开发方法(catia二次开发)

caa插件的开发方法(catia二次开发)

ID:14670660

大小:63.00 KB

页数:6页

时间:2018-07-29

caa插件的开发方法(catia二次开发)_第1页
caa插件的开发方法(catia二次开发)_第2页
caa插件的开发方法(catia二次开发)_第3页
caa插件的开发方法(catia二次开发)_第4页
caa插件的开发方法(catia二次开发)_第5页
资源描述:

《caa插件的开发方法(catia二次开发)》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库

1、插件的开发方法2004-8-24一、创建插件接口1.1头文件如:#ifndefCAAIAfrGeoCreationWkbAddin_h#defineCAAIAfrGeoCreationWkbAddin_h//ApplicationFrameFramework#include//NeededtoderivefromCATIWorkbenchAddin//LocalFramework#include"CAAAfrGeoCreationWbench.h"//NeededtoexporttheIID//G

2、lobalUniqueIDentifierdefinedin.cpp//exportedbyCAAAfrGeoCreationWbenchexternIIDExportedByCAAAfrGeoCreationWbenchIID_CAAIAfrGeoCreationWkbAddin;classExportedByCAAAfrGeoCreationWbenchCAAIAfrGeoCreationWkbAddin:publicCATIWorkbenchAddin{//UsedinconjunctionwithCATImplementInterf

3、aceinthe.cppfileCATDeclareInterface;public:};#endif1.2源文件1.2.1组成1)接口标识符(IID)构造2)接口实现1.2.2实例如:#include//Useuuid_gen-ConUNIXoruuidgen-sonNTtogeneratetheIIDIIDIID_CAAIAfrGeoCreationWkbAddin={/*a4188b88-d4c1-11d3-b7f5-0008c74fe8dd*/0xa4188b88,0xd4

4、c1,60x11d3,{0xb7,0xf5,0x00,0x08,0xc7,0x4f,0xe8,0xdd}};//DeclaresthatCAAIAfrGeoCreationWkbAddinisaninterfacethat//OM-derivesfromCATIWorkbenchAddinCATImplementInterface(CAAIAfrGeoCreationWkbAddin,CATIWorkbenchAddin);1.3TIE文件1.3.1内容头文件引用1.3.2实例如://UsedbymkmktocreateTIE_CAAIAf

5、rGeoCreationWkbAddin.h#include详见《接口开发》二、插件开发2.1头文件2.1.1结构#ifndef<插件类>_H#define<插件类>_H//Systemframework#include"CATBaseUnknown.h"//NeededtoderivefromCATBaseUnknown//ApplicationFrameframworkclassCATCmdContainer;//NeededbyCreateToolbarsclass<插件类>

6、:publicCATBaseUnknown{//UsedinconjunctionwithCATImplementClassinthe.cppfileCATDeclareClass;public:<插件类>();//构造函数virtual~<插件类>();//析构函数6//InstantiatesthecommandheadersforthecommandsvoidCreateCommands();//定义命令标签//CreatestoolbarsandarrangesthecommandsinsideCATCmdContainer*Cre

7、ateToolbars();//创建菜单和工具条private:};#endif2.1.2实例#ifndefCAAAfrGeoOperationAdn_H#defineCAAAfrGeoOperationAdn_H//Systemframework#include"CATBaseUnknown.h"//NeededtoderivefromCATBaseUnknown//ApplicationFrameframworkclassCATCmdContainer;//NeededbyCreateToolbarsclassCAAAfrGeoOper

8、ationAdn:publicCATBaseUnknown{//UsedinconjunctionwithCATImplementClassinthe.cppfileCATDec

当前文档最多预览五页,下载文档查看全文

此文档下载收益归作者所有

当前文档最多预览五页,下载文档查看全文
温馨提示:
1. 部分包含数学公式或PPT动画的文件,查看预览时可能会显示错乱或异常,文件下载后无此问题,请放心下载。
2. 本文档由用户上传,版权归属用户,天天文库负责整理代发布。如果您对本文档版权有争议请及时联系客服。
3. 下载前请仔细阅读文档内容,确认文档内容符合您的需求后进行下载,若出现内容与标题不符可向本站投诉处理。
4. 下载文档时可能由于网络波动等原因无法下载或下载错误,付费完成后未能成功下载的用户请联系客服处理。