1 用户界面开发——实例说明 ——Creating a Workbench 一、目标 1.1 目标 Showing how to create a workbench to be added to a given workshop. 1.2 显示界面(w orkbench ) 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 used to make the link between the workbench and the commands. 二、CAAAfrGeoCreationWbench 实例说明 2.1 功能 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 new commands: Cuboid, Sphere, Torus, and Cylinder 1 and 2. The Surfaces toolbar. It includes three new commands: Revolution Surface, Nurbs Surface, and Offset Surface. The only change in the menu bar is the addition of these commands in the Insert menu using two submenus below the existing ones. 2 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 exposed 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...