CATIA CAA关于workbench和adding的二次开发 下载本文

//

// Usage notes: //

//===================================================================

// Apr 2013 Creation: Code generated by the CAA wizard Administrator

//===================================================================

#include \

#include \

#include \

CATImplementClass(NewAddin,

Implementation,

CATBaseUnknown,

CATnull );

//-----------------------------------------------------------------------------

// NewAddin : constructor

//-----------------------------------------------------------------------------

NewAddin::NewAddin():

CATBaseUnknown() { }

//-----------------------------------------------------------------------------

// NewAddin : destructor

//-----------------------------------------------------------------------------

NewAddin::~NewAddin() { }

// Link the implementation to its interface

// ---------------------------------------

//TIE or TIEchain definitions

#include \

TIE_CATIPrtWksAddin(NewAddin);

//Methods implementation

voidNewAddin ::CreateCommands(){

//new CAADrwHeader(\*)NULL); }

CATCmdContainer *NewAddin::CreateToolbars(){

NewAccess(CATCmdContainer, pCAADrwTlb, MyCenterLine);

NewAccess(CATCmdStarter, pCenterLineStr, CenterLineStr );

SetAccessCommand(pCenterLineStr, \

SetAccessChild(pCAADrwTlb, pCenterLineStr );

AddToolbarView(pCAADrwTlb, 1, UnDock);

returnpCAADrwTlb; 在其中:

●添加了头文件包含语句:

#include \#include \

●完成了用于实现工具命令的CreateCommands函数;

●完成了用于添加工具栏的CreateToolbars函数;

3). Framework的“IdentityCard.h”文件:

// COPYRIGHT DassaultSystemes 2013

//=================================================================== //

// IdentityCard.h

// Supplies the list of prerequisite components for framework HelloWorld //

//=================================================================== //

// Usage notes:

// For every prereq framework FW, use the syntax:

// AddPrereqComponent (\ //

//=================================================================== //

// Apr 2013 Creation: Code generated by the CAA wizard Administrator

//===================================================================

// DO NOT EDIT :: THE CAA2 WIZARDS WILL ADD CODE HERE

AddPrereqComponent(\

AddPrereqComponent(\

AddPrereqComponent(\

AddPrereqComponent(\

AddPrereqComponent(\

AddPrereqComponent(\

// END WIZARD EDITION ZONE }

如果需要使用其他Framework的资源,在这里进行引入。实际使用时可以使用向导完成,点击Define Prerequsite Frameworks...命令:

在弹出的对话框中添加你需要使用到的Framework,如下所示:

4). imakfile.mk文件