Lifecycle Applications

Engineering Change Management

The ECO Manager Interface

Creating and deleting ECOs
Use Case

Abstract

This article shows how to use the ENOVIBOEcoManager interface of the ENOVInterfaces framework to create and delete Engineering Change Orders in the Change Management domain.


What You Will Learn With This Use Case

This use case is intended to show you how to create and delete Engineering Change Orders in the Change Management domain. ECOs are used to control and direct the modification or development of a product. The ENOVInterfaces framework contains the ENOVIBOEcoManager interface which allows you to directly create and delete the ECO which may then be manipulated as desired.

[Top]

The CAAEviEcoManager Use Case

CAAEviEcoManager is a use case of the CAAENOVInterfaces.edu framework that illustrates the creation and deletion of Engineering Change Orders.

[Top]

What Does CAAEviEcoManager Do?

CAAEviEcoManager begins by opening a VPM session and creating a login a session. Then the ECO Manager is retrieved. The necessary parameters are created and the manager is directly used to create and delete the ECO.

The ENOVInterfaces interface/methods shown are as follows:

[Top]

How to Launch CAAEviEcoManager

To launch CAAEviEcoManager, you will need to set up the build time environment, then compile CAAEviEcoManager.cpp along with its prerequisites, set up the run time environment, and then execute the use case. The required interfaces can be found in the ENOVInterfaces, VPMInterfaces, VPMPersistency, and System frameworks. From the directory where the executable file is stored, enter"CAAEviEcoManager" to execute the program. [1].

[Top]

Where to Find the CAAEviEcoManager Code

The CAAEviEcoManager use case is made of a single file located in the CAAEviEcoManager.m module of the CAAENOVInterfaces.edu framework:

Windows InstallRootDirectory\CAAENOVInterfaces.edu\CAAEviEcoManager.m\
Unix InstallRootDirectory/CAAENOVInterfaces.edu/CAAEviEcoManager.m/

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

[Top]

Step-by-Step

For demonstration purposes, the code from the CAAEviEcoManager use case is shown here. There are three logical steps in the CAAEviEcoManager use case:

  1. Get the ECO manager
  2. Create an Engineering Change Order
  3. Delete the Engineering Change Order

[Top]

Get the ECO manager

    #include "ENOVIBOEcoManager.h"
  

This include statement gives access to the interface demonstrated here.

//--- Get ENOVIBOEcoManager

    ENOVIBOEcoManager_var spEcoMgr = GetBOManager(); 
    if ( spEcoMgr == NULL_var ) 
    {  
    	cout << "ERROR in getting Eco Manager." << endl << flush;
    	VPMSession::CloseSession();
  	return 2;
    }
    cout << "Got EcoManager successfully." << endl << flush;    
      

 

  1. After the VPM session is opened, you can simply retrieve the object managers with a call to GetBOManager().
  2. Here, the ECO manager is called spEcoMgr.

[Top]

Create an Engineering Change Order

    #include "ENOVIBOEcoManager.h"
    #include "CATIEnovCMEco.h"
    #include "CATUnicodeString.h"
	 

These include statements are required for the following operations.

    //--- Create an Engineering Change Order 
    
    CATIEnovCMEco_var Eco = NULL_var;
    CATUnicodeString EcoType("ECO");
    CATUnicodeString EcoVersion("1");
    CATUnicodeString EcoName("MyEco");
    CATUnicodeString EcoPriority("Routine");
    CATUnicodeString EcoTypeCode("Release");
    CATUnicodeString EcoInitialAbstract("This is a CAA ECO.");
 
    rc = spEcoMgr->CreateNewEco( EcoType, 
                                 EcoVersion,
                                 Eco,
                                 EcoName,
                                 EcoPriority,
                                 EcoTypeCode,
                                 EcoInitialAbstract );
                                  
    if ( !SUCCEEDED(rc) || Eco==NULL_var )
    {  
    	cout << "ERROR in creating ECO." << endl << flush;
    	VPMSession::CloseSession();
       	return 3;
    } 
       
    cout << "Created new Engineering Change Order successfully." << endl << flush;

 

  1. With the ECO manager spEcoMgr a call to member method CreateNewEco is made. The arguments passed are EcoType ("ECO"), EcoVersion ("1"), EcoName ("MyEco"), EcoPriority ("Routine"), EcrTypeCode ("Release"), and EcoInitialAbstract ("This is a CAA ECO").
  2. The method creates a CATIEnovCMEco object (Eco) and returns S_OK when successfully completed. E_FAIL is returned if the create is not successful.

[Top]

Remove an Engineering Change Order

    #include "ENOVIBOEcoManager.h"
    #include "CATIEnovCMEco.h"
	 

These include statements are required for the following operations.

//--- Delete Engineering Change Order

    boolean delActions = FALSE; 
    rc = spEcoMgr->RemoveEco(Eco, delActions);
                                  
    if ( !SUCCEEDED(rc))
    {  
    	cout << "ERROR in deleting ECO." << endl << flush;
    	VPMSession::CloseSession();
       	return 4;
    }    
    cout << "Deleted Engineering Change Order successfully." << endl << flush;

 

  1. With the ECO manager spEcoMgr a call to member method RemoveEco is made. The arguments passed are the Eco and the boolean variable delActions which determines if the ECO's attached action are to be deleted also.
  2. The method deletes the object (Eco) and returns S_OK when successfully completed. E_FAIL is returned if the delete is not successful.

[Top]


In Short

Use the ENOVIBOEcoManager interface to create and delete ECOs. You can retrieve the ECO Manager with GetBOManager().

[Top]


References

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

History

Version: 1 [Feb 2002] Document created
[Top]

Copyright © 1994-2002, Dassault Systèmes. All rights reserved.