Machining

All Machining Workbenches

Customizing the Prismatic workbench to create operations from Machining Processes referenced in Catalogs

Implementing the CATIMfgMachiningProcessLog interface
Use Case

Abstract

This article discusses the CAAMaiCreateToolBarFromCatalog use case and explains how to use the CATIMfgCatalogServices manufacturing interface. It describes a short cut to access to the Machining Process instantiation without using the catalog browser.

A prerequisite is to refer to the CATIManufacturingProgramAddin interface for more details about the complete customization of a workbench


What You Will Learn With This Use Case

This use case is intended to help you to create your own toolbars and sub-toolbars  in the Prismatic Machining workbench with command headers lauching commands from catalog components.  These components are Machining Processes referenced in catalogs and when the command is launched, the Machining Process instantiation panel is displayed.

[Top]

The CAAMaiCreateToolBarFromCatalog Use Case

CAAMaiCreateToolBarFromCatalog is a use case of the CAAManufacturingItf.edu framework in the CAAMaiCreateToolBarFromCatalog.m module that illustrates ManufacturingInterfaces framework capabilities and specially their customization.

[Top]

What Does CAAMaiCreateToolBarFromCatalog Do

The CAAMaiCreateToolBarFromCatalog use case illustrates a use of the CATIMfgCatalogServices through an implementation of CATIManufacturingProgramAddin interface. It enables the customer to

 

[Top]

How to Use CAAMaiCreateToolBarFromCatalog

To use CAAMaiCreateToolBarFromCatalog, you will need to:

[Top]

Where to Find the CAAMaiCreateToolBarFromCatalog Code

The CAAMaiCreateToolBarFromCatalog use case code is located in the CAAMaiCreateToolBarFromCatalog.m module of the CAAManufacturingItf.edu framework:

Windows InstallRootDirectory\CAADoc\CAAManufacturingItf.edu\CAAMaiCreateToolBarFromCatalog.m
Unix InstallRootDirectory/CAADoc/CAAManufacturingItf.edu/CAAMaiCreateToolBarFromCatalog.m

where InstallRootDirectory is the directory where the CAA CD-ROM is installed.

[Top]

Step-by-Step

There are two logical steps in CAAMaiCreateToolBarFromCatalog:

  1. Creating the commands headers to launch Machining Process instantiation form catalogs components
  2. Creating the tool bar and its sub-toolbars

We now comment each of those sections by looking at the code.

[Top]

Creating a command header launching Machining Prcoesses instantiation

The CAAMaiStandardMPCom.cpp file illustrates how to access to the machining process instantiation command through the CATIMfgCatalogServices interface.

The following code enables to access to the CATIMfgCatalogServices :

CATIMfgCatalogServices *piServices=NULL;

CATString ClassName("CATMfgCatalogServices");

CATInstantiateComponent (ClassName,CATIMfgCatalogServices::ClassId(),(void**)&piServices);

Then the BuildMfgStartupMPPath method builds a complete path from a catalog name, by analysing the CATInstallPath environment variable and the "startup\Manufacturing\Processes" relative path :

CATUnicodeString CatalogName = "MP_demo.catalog";

CATUnicodeString Path;

HRESULT Res = piServices->BuildMfgStartupMPPath(CatalogName, Path);

In this case, the MP_demo.catalog file is delivered in the standard Machining configuration (look at intel_a\startup\Manufactruing\Processes path under Windows or intel_a/startup/Manufactruing/Processes path under Unix). Any other method to build the path can be used.

The LaunchMPApplication method launches the Machining Process instantiation and looks like the instantiation from the catalog browser :

CATUnicodeString PathChapter = "Chapter.1/Drilling Processes";

CATUnicodeString NomMPRef = "Standard Drilling";

CATString Keyword = "Standard_Drilling";

Res = piServices->LaunchMPApplication(Path, PathChapter, NomMPRef, Keyword);

The Keyword argument enables to customize the Machining Process name at the instantiation. It has to be defined in the resources\msgcatalog\CATMfgMachProcessCatalogAccess.CATNls file but it is not a prerequisite

[Top]

Creating the "NCToolbar" toolbar and its sub-toolbars

The CAAMaiAddinCmd.cpp file declares all the command headers and organizes the toolbars.

Two commands are declared from the SampleCmdHdr command header in the CreateCommands method. These headers are linked to the CAAMaiStandardMPCom and CAAMaiStandardMPCom2 commands. This is there that the customer will declare his own commands. The command icons are defined in the SampleCmdHdr.CATRsc resource file of the CAAManufacturingItf.edu framework

A sub-toolbars sample is proposed in the CreateToolbars method : the toolbar contains two sub-toolbars with two commands each one.

The tool bar : The 2 sub-toolbars : and

[Top]

Advise

It is important to set the command headers icons in the SampleCmdHdr.CATRsc resource file to be able to launch the Machining Process instantiation.

You can use commands from Machining Processes catalogs and official commands in your tool bars (Let's have a look in the CATMfgHeader.CATRsc file).

[Top]

 


In Short

This article provides an example on how to use the CATIMfgCatalogServices interface dedicated to the workbench customization.

[Top]


References

[1] Building and Launching a CAA V5 Use Case
[Top]

History

Version: 1 [January 2008] Document created
[Top]

Copyright © 2008, Dassault Systèmes. All rights reserved.