SetAccessNext(pCAAAfrMSurfNurbsStr,pCAAAfrMSurfOffsetStr); SetAccessCommand(pCAAAfrMSurfOffsetStr,\
The Surfaces submenu command container is created and set next to the Solids submenu command container. Then the Revolution Surface command starter is created and set as the child of the Surfaces submenu command container, and the others are cretaed and set next of one another. The menu and submenu resources, and how to provide them, are described in Creating Resources for Workbenches. See also Providing the Resources and Inserting the Workbench into the Start Menu for an overview of all the resources to create. 3.4.3.5 GetCustomInterfaces 方法 The GetCustomInterfaces method must be empty. The names of the interface exposed by the workbench to enable clients to create add-ins is returned by the GetAddinInterface method.
3.4.4 修改字典(Updating the Dictionary)
Update the interface dictionary, that is a file named, for example, CAAApplicationFrame.dico, whose directory's pathname is concatenated at run time in the CATDictionaryPath environment variable, and containing the following declaration to state that the CAAAfrGeoCreationWkb class implements the CATICAAAfrGeometryWksConfiguration interface, and whose code is located in the libCAAAfrGeoCreationWbench shared library or DLL. The update is in bold typeface:
CATApplicationFrame CAAIAfrGeoCreationWkbFactory libCAAAfrGeoCreationWbench CAAAfrGeoCreationWkb CATICAAAfrGeometryWksConfiguration libCAAAfrGeoCreationWbench
3.5 创建资源及嵌入 Workbench
(Providing the Resources and Inserting the Workbench into the Start Menu)
3.5.1 workbench 资源( The workbench and command container resources) 3.5.1.1 文本资源 The resource file containing the title and help messages in the English language, and that can be translated into other languages. It is suffixed using CATNls The resource files must have the workbench identifier as file name, that is
CAAAfrGeoCreationWkb. This identifier is declared in the CreateWorkbench method of the workbench description class, as the third parameter of the NewAccess macro that creates the workbench.
NewAccess(CATCmdWorkbench,pCAAAfrGeoCreationWkb,CAAAfrGeoCreationWkb);
The workbench resource files are then CAAAfrGeoCreationWkb.CATNls and
CAAAfrGeoCreationWkb.CATRsc. These files are located in the CNext\\resources\\msgcatalog directory of the framework containing the workbench module. This directory includes subdirectories, one for each language into which the title and messages of the
CAAAfrGeoCreationWkb.CATNls file can be translated. The resource files contain: o o o Workbench: the title, messages, and icons to be displayed in the Start menu Toolbars: their titles Menus and submenus: their titles, icons, and mnemonics 14
Icon boxes: their titles.
Each resource is provided using a key and a text, or a file name without suffix, separated by the equal sign. The key is built as a concatenation of the object identifier you defined as the third parameter of the
NewAccess macro, a dot, and a keyword designating the appropriate resource. The message is
enclosed
using double quotes and ended using a semicolon. For example, the CAAAfrGeoCreationWkb workbench title is defined as follows:
CAAAfrGeoCreationWkb.Title = \
The CAAAfrGeoCreationWkb.CATNls file contains: ? The resources for the workbench itself: the title used in the Start menu, its associated help message, the short help displayed when the mouse is over the workbench icon, and the long help ? ? // WORKBENCH
//---------------------------------------------------------------------------CAAAfrGeoCreationWkb.Title CAAAfrGeoCreationWkb.Help Elements\two toolsbars: - One for some Solid Elements - The other for some Surfacic Elements\//---------------------------------------------------------------------------// TOOLBAR
//---------------------------------------------------------------------------CAAAfrSolidEltTlb.Title CAAAfrSurfacicEltTlb.Title = \Creation Workbench. It is used to demonstrate workbenches. = \Creation\
CAAAfrGeoCreationWkb.ShortHelp = \
The titles of the toolbars and icon boxes The titles and mnemonics of the menus and submenus.
//----------------------------------------------------------------------------
//---------------------------------------------------------------------------// SUB - MENU //---------------------------------------------------------------------------CAAAfrSolidEltSnu.Title
CAAAfrSolidEltSnu.Mnemonic CAAAfrSurfacicEltSnu.Title = \
CAAAfrSurfacicEltSnu.Mnemonic = \
3.5.1.2 位图资源 CAAAfrGeoCreationWkb.CATRsc 15
This file contains the category, that is the submenu of the Start menu where the workbench should appear, and the names of the icons to be associated with the workbench for the Start menu.
CAAAfrGeoCreationWkb.Category = \
// Icons for the Welcome window 64x64 CAAAfrGeoCreationWkb.Icon.NormalPnl = \\\
CAAAfrGeoCreationWkb.Icon.NormalCtx = \CAAAfrGeoCreationWkb.Icon.PressedlCtx = \CAAAfrGeoCreationWkb.Icon.FocusedlCtx = \for the workbench toolbar 24x24 CAAAfrGeoCreationWkb.Icon.NormalRep = \\\
It is in this file that you declare if the workbench is warm start compliant [3]. The
CAAGeometry document is not warm start compliant, so its workbenches are not compliant too.
3.5.2 command header 资源
The command header resources in the command header resource files: titles, messages, icons, and the accelerators associated with the commands. The resource files searched for at run time should have the same name than you command header class, that is CAAAfrGeoCreationWkbHeader. 3.5.2.1 文本资源
搜索“diyifanwen.net”或“第一范文网”即可找到本站免费阅读全部范文。收藏本站方便下次阅读,第一范文网,提供最新经管营销CATIA二次开发 (6)全文阅读和word下载服务。
相关推荐: