文档介绍:用户界面开发——实例说明
——Creating a Workbench
一、目标
目标
Showing how to create a workbench to be added to a given workshop.
显示界面(workbench )
Like the workshop, the workbench is an object that gathers mands to work on the document and arrange them in toolbars and menus.
mand header)
Command headers are used to make the link between the workbench and mands.
二、CAAAfrGeoCreationWbench实例说明
功能
The CAAAfrGeoCreationWbench use case creates a workbench named CAA Geometrical Creation for the CAAGeometry document. Its specifications cover most of the cases you will meet. Two toolbars are provided:
The Solids toolbar. It includes five mands: Cuboid, Sphere, Torus, and Cylinder 1 and 2.
The Surfaces toolbar. It includes three mands: Revolution Surface, Nurbs Surface, and Offset Surface.
The only change in the menu bar is the addition of mands in the Insert menu using two submenus below the existing ones.
运行
运行CATIA系统,并依次选择Start->Infrastructure->CAA V5: Geometrical Creation:
This creates a new CAAGeometry document with the CAA V5: Geometrical Creation workbench active.
框架组成
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 exposed by the workbench and that all its add-ins must implement
TIE_CAAIAfrGeoCreationWkbAddin
TIE class for the add-in interface
三、程序结构(Step-by-Step)
编程准备
确认
Make sure that the workshop to which it is dedicated exposes 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 Protect