CAA用户界面开发——实例说明(CATIA二次开发)

更新时间:2023-07-26 12:58:05 阅读: 评论:0

用户界面开发——实例说明
——Creating a Workbench
一、目标
1.1 目标
Showing how to create a workbench to be added to a given workshop.
1.2 显示界面(workbench )
Like the workshop, the workbench is an object that gathers the commands to work on the document and arrange them in toolbars and menus.
1.3 命令标签(command header)
Command headers are ud to make the link between the workbench and the commands.
二、CAAAfrGeoCreationWbench实例说明
2.1 功能
The CAAAfrGeoCreationWbench u ca creates a workbench named CAA Geometrical Creation for the CAAGeometry document. Its specifications cover most of the cas you will meet. Two toolbars are provided:
The Solids番茄红烧鱼 toolbar. It includes five new commands: Cuboid, Sphere, Torus, and Cylinder 1 and 2.
咏蛙
The Surfaces toolbar. It includes three new commands: Revolution Surface, Nurbs Surface, and Offt Surface.
The only change in the menu bar is the addition of the commands in the Inrt menu using two submenus below the existing ones.
2.2 运行
运行CATIA系统,并依次选择Start->Infrastructure->CAA V5: Geometrical Creation
This creates a new CAAGeometry document with the CAA V5: Geometrical Creation workbench active.
2.3 框架组成
CAAAfrGeoCreationWkb
Workbench description class
CAAAfrGeoCreationWkbFactory
Factory class for the workbench class
CAAIAfrGeoCreationWkbFactory
Factory interface implemented by CAAAfrGeoCreationWkbFactory
TIE_CAAIAfrGeoCreationWkbFactory
TIE class for the factory interface
CAAIAfrGeoCreationWkbAddin
Add-in interface expod by the workbench and that all its add-ins must implement
TIE_CAAIAfrGeoCreationWkbAddin
TIE class for the add-in interface
三、程序结构(Step-by-Step)
3.1 编程准备
3.1.1 确认
Make sure that the workshop to which it is dedicated expos the CATIxxxConfiguration interface, where xxx is the workshop identifier, in a PublicInterfaces or ProtectedInterfaces directory.
Create the module directory to store the workbench code along with its two subdirectories LocalInterfaces and src. Then you will need to create the following files.
胎菊
In the framework's ProtectedInterfaces directory
 
显眼的近义词
CAAIAfrGeoCreationWkbAddin.h
The header file of the workbench expod interface to enable clients to create add-ins
In the CAAAfrGeoCreationWbench.m\LocalInterfaces directory
 
CAAIAfrGeoCreationWkbFactory.h
The header file of the workbench factory interface
 多大会走路
CAAAfrGeoCreationWkbFactory.h
The header file of the workbench factory class
 
CAAAfrGeoCreationWkb.h
The header file of the workbench description class
In the CAAAfrGeoCreationWbench.m\src directory
 
CAAIAfrGeoCreationWkbAddin.cpp
The source file of the workbench expod interface to enable clients to create add-ins
 
CAAIAfrGeoCreationWkbFactory.cpp
The source file of the workbench factory interface
 
CAAAfrGeoCreationWkbFactory.cpp
The source file of the workbench factory class
 
CAAAfrGeoCreationWkb.cpp
The source file of the workbench description class
 
TIE_CAAIAfrGeoCreationWkbAddin.tsrc
The file to create the TIE for CAAIAfrGeometryWksAddin
 
TIE_CAAIAfrGeoCreationWkbFactory.tsrc
The file to create the TIE for CAAIAfrGeometryWksFactory
In the dictionary, that is the CNext\code\dictionary directory, referenced at run time using the CATDictionaryPath environment variable, create or update
 
CAAApplicationFrame.edu.dico
The interface dictionary
 
CAAApplicationFrame.edu.fact
The factory dictionary
In the CNext\resources\msgcatalog directory, referenced at run time using the CATMsgCatalogPath environment variable
 
CAAAfrGeoCreationWkb.CATNls
The workbench message file
 
CAAAfrGeoCreationWkbHeader.CATNls and
CAAAfrGeoCreationWkbHeader.CATRsc
The command header resource files
3.1.2 开发步骤
上呼吸道感染症状
#
Step
Where
1
Create the workbench factory interface
LocalInterfaces and src
2
Create the workbench factory
LocalInterfaces and src
3
Create the workbench description class
LocalInterfaces and src
4
Create the command headers
CreateCommands method
5
Create the workbench and arrange the commands
CreateWorkbench method
6
Provide the resources and inrt the workbench into the Start menu
Resource files
7
鼻孔外翻Create the workbench expod interface
ProtectedInterfaces and src
3.2 建立Workbench 的Factory Interface
(Creating the Workbench Factory Interface)
3.2.1 命名
CAAIAfrGeoCreationWkbFactory
3.2.2 头文件(the header file )
CAAIAfrGeoCreationWkbFactory.h
#include <CATIGenericFactory.h>
extern IID IID_CAAIAfrGeoCreationWkbFactory;
class CAAIAfrGeoCreationWkbFactory : public CATIGenericFactory
{
  CATDeclareInterfaceword打钩方框;
  public :
};
A factory interface is a CAA interface, that is, an abstract class that derives from CATIGenericFactory. As any interface, it has an IID declared as IID_ followed by the interface name, and includes the CATDeclareInterface macro that declares that this abstract class is an interface. No additional method than tho of CATIGenericFactory is necessary. Don't forget the public keyword required by the TIE compiler.(???)
3.2.3 源文件(The source file )
CAAIAfrGeoCreationWkbFactory.cpp
#include <CAAIAfrGeoCreationWkbFactory.h>
IID IID_CAAIAfrGeoCreationWkbFactory = {
    0xb32eed10,
    0xd4c1,
    0x11d3,
    {0xb7, 0xf5, 0x00, 0x08, 0xc7, 0x4f, 0xe8, 0xdd}
  };
CATImplementInterface(CAAIAfrGeoCreationWkbFactory, CATIGenericFactory);
The CATImplementInterface macro is ud in conjunction with CATDeclareInterface in the header file to make an interface from this abstract class and to declare that it OM-derives from CATIGenericfactory.
3.2.4 TIE文件(The TIE tsrc file)
TIE_CAAIAfrGeoCreationWkbFactory.tsrc
#include "CAAIAfrGeoCreationWkbFactory.h"
The Multi-Workspace Application Builder (mkmk) will generate the TIE for this interface for you, that is, the TIE_CAAIAfrGeoCreationWkbFactory.h file in the ProtectedGenerated directory.

本文发布于:2023-07-26 12:58:05,感谢您对本站的认可!

本文链接:https://www.wtabcd.cn/fanwen/fan/82/1118211.html

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。

标签:开发   说明   界面   标签   红烧鱼   选择   组成   编程
相关文章
留言与评论(共有 0 条评论)
   
验证码:
推荐文章
排行榜
Copyright ©2019-2022 Comsenz Inc.Powered by © 专利检索| 网站地图