CATIA CAA 二次开发 详细教程(5)添加一个点(3)
CATIA CAA 二次开发 详细教程
ed as a second parameter. In this use case, we pass the storage path name and document name as an argument to the program.
5.2 保存
rc = CATDocumentServices::Save (*pDoc); if (SUCCEEDED(rc)) {
cout << \ } else {
cout << \ return 3; }
To save the new document under the same name, use the Save static method of CATDocumentServices. This method takes the CATDocument pointer to the document as the only parameter.
六、删除(Remove the document)
rc = CATDocumentServices::Remove (*pDoc); if (SUCCEEDED(rc)) {
cout << \ } else {
cout << \ return 6; }
If you ever needed to re-open the document during this same session, it would then be necessary to also remove it from the session after having saved it. Otherwise, you need not worry about it since deleting the session will automatically remove the document as well. To remove the document, you should use the Remove static method of CATDocumentServices.
七、按指定文档格式保存(Exporting a Document
Format Type)
7.1 Defining the New Document Format Type
CATProduct_OmbExportType CATIExportTypeManager libCAAOmbExportType
40
CATIA CAA 二次开发 详细教程
A new document format type is simply defined by adding a new entry in the current framework's dictionary. This new entry will cause the File/SaveAs dialog box to list the new format type among the types defined to the save operation. The first parameter, CATProduct_OmbExportType, indicates that the exporting document is a Product-type document (i.e., a document having a .CATProduct suffix) and that the exported document format type is \the saved document. The second parameter indicates that this new document type will implement the CATIExportTypeManager interface in order to define the specific save operations necessary to export the new document. The last parameter is the name of the library in which the implementation module is to be found.
7.2 Implementing CATIExportTypeManager
See the Object Modeler articles [2] for a detailed explanation about interface implementations.
The implementation of CATIExportTypeManager is found in the CAAOmbExportType.m module defining the CAAEOmbExportTypeData implementation class.
CATImplementClass( CAAEOmbEExportTypeData,
CodeExtension, CATBaseUnknown,
CATProduct_OmbExportType );
The CATImplementClass macro defines the implementation class CAAEOmbExportType
Data as a code extension implementing the CATProduct_OmbExportType late type. #include \
TIE_CATIExportTypeManager( CAAEOmbExportTypeData );
The above statement indicates that this is an implementation of the CATIExportTypeManager interface.
HRESULT CAAEOmbExportTypeData::ExportData ( CATDocument *pDoc,
CATUnicodeString path ) {
cout << \ HRESULT rc = CATDocumentServices::SaveAs (*pDoc,
path);
return rc; }
In this case, the document is simply saved using the SaveAs method of CATDocumentServices. However, it is in this method that you must code any specific save o
perations necessary for your new document type.
41
CATIA CAA 二次开发 详细教程
CATIA CAA 二次开发详细教程(11) 程序的发布
1. 发布条件:
已安装了CATIA,版本不能低于开发使用的CAA版本。 CAA代码成果物“intel_a”文件中的所有文件。
1. 发布方法:
2. 将“intel_a”文件存放在要发布机器上,存放“intel_a”文件的路径最好不要有中文字符和空格。(例:E:\\VCINewFromExisting\\intel_a)
3. 点击 ”开始” –> ”所有程序” –> “CATIA P3” –> “Tools” –>” Environment Editor V5R18”
1. 点击 “确定”。
42
CATIA CAA 二次开发 详细教程
1. 选择”Environment” –> “New”
1. “Name” 栏为将要创建的桌面快捷方式的名称;在”Install Path” 栏中,CATIA的安装路径后输入”; E:\\VCINewFromExisting\\intel_a”,这是要发布的intel_a的存放路径;其他如图所选,采取默认设置。完成后点击”OK”。
1. 至此发布完成,在桌面上会生成一个名为”NewFromExisting”的CATIA类型图标。双击该图标,会启动CATIA,用户便可使用CATIA原所有功能和新发布的功能。
1. 与原CATIA图标集成发布方法: 设:
Catia的工作目录是 D:\\DS\\B18\\intel_a; 已开发插件的工作目录是D:\\MyAddin\\intel_a;
将D:\\MyAddin\\intel_a下这些文件复制到D:\\DS\\B18\\intel_a对应的位置,即可在运行Catia时候自动加载插件:
43
CATIA CAA 二次开发 详细教程
code \\ bin \\ *.dll; \\ code \\dictionary \\ *.dico; \\ code \\ productIC \\ *.script; \\ code \\ productIC \\ *.xml;
\\ resources \\ graphic \\ icons \\ normal \\ *.bmp; \\ resources \\ msgcatalog \\ *.CATNls; \\ resources \\ msgcatalog \\ *.CATRsc;
44
…… 此处隐藏:1840字,全部文档内容请下载后查看。喜欢就下载吧 ……相关推荐:
- [资格考试]机械振动与噪声学部分答案
- [资格考试]空调工程课后思考题部分整合版
- [资格考试]电信登高模拟试题
- [资格考试]2018年上海市徐汇区中考物理二模试卷(
- [资格考试]坐标转换及方里网的相关问题(椭球体、
- [资格考试]语文教研组活动记录表
- [资格考试]广东省2006年高应变考试试题
- [资格考试]LTE学习总结—后台操作-数据配置步骤很
- [资格考试]北京市医疗美容主诊医师和外籍整形外科
- [资格考试]中学生广播稿400字3篇
- [资格考试]CL800双模站点CDMA主分集RSSI差异过大
- [资格考试]泵与泵站考试复习题
- [资格考试]4个万能和弦搞定尤克里里即兴弹唱(入
- [资格考试]咽喉与经络的关系
- [资格考试]《云南省国家通用语言文字条例》学习心
- [资格考试]标准化第三范式
- [资格考试]GB-50016-2014-建筑设计防火规范2018修
- [资格考试]五年级上册品社复习资料(第二单元)
- [资格考试]2.对XX公司领导班子和班子成员意见建议
- [资格考试]关于市区违法建设情况的调研报告
- 二0一五年下半年经营管理目标考核方案
- 2014年春八年级英语下第三次月考
- 北师大版语文二年级上册第十五单元《松
- 2016国网江苏省电力公司招聘高校毕业生
- 多渠道促家长督导家长共育和谐 - 图文
- 2018 - 2019学年高中数学第2章圆锥曲线
- 竞争比合作更重要( - 辩论准备稿)课
- “案例积淀式”校本研训的实践与探索
- 新闻必须客观vs新闻不必客观一辩稿
- 福师大作业 比较视野下的外国文学
- 新编大学英语第二册1-7单元课文翻译及
- 年产13万吨天然气蛋白项目可行性研究报
- 河南省洛阳市2018届高三第二次统一考试
- 地下车库建筑设计探讨
- 南京大学应用学科教授研究方向汇编
- 2018年八年级物理全册 第6章 第4节 来
- 毕业论文-浅析余华小说的悲悯性 - 以《
- 2019年整理乡镇城乡环境综合治理工作总
- 广西民族大学留学生招生简章越南语版本
- 故宫旧称紫禁城简介




