Lifecycle Applications |
Engineering Change Management |
The Affected Objects InterfaceAdding and Removing Affected Objects |
Use Case |
AbstractThis article shows how to use the ENOVICWAffectedObjects interface of the ENOVInterfaces framework to add and remove an existing object as an Affected Object for a Change Management object, i.e., Action, Engineering Change Order, or Engineering Change Request. |
This use case is intended to show you how to add an existing object, in this case a part version, to an existing Engineering Change Order as an affected object. You will then see how to remove the affected object from the ECO. This example uses an ECO but the technique is the same for Actions, and Engineering Change Requests. You would use this operation if for example you would like to direct the modification of a certain part version. The part version is attached to the ECO as an affected object and the ECO controls the modification of the part. The ECO cannot be released until the work on the part is completed. Other affected objects include documents and tables of content. The ENOVInterfaces framework contains the interface ENOVICWAffectedObjects which allows you to directly add and remove affected objects for Change Management objects.
[Top]
CAAEviAffectedObjects is a use case of the CAAENOVInterfaces.edu framework that illustrates how you use the ENOVICWAffectedObjects interface to add and remove an affected object for to an existing Change Management object.
[Top]
CAAEviAffectedObjects begins by opening a VPM session and creating a login a session. Then the Eco Manager is retrieved. To set up the demonstration, an ECO is created with the necessary parameters as well as a part version. For more information on how to create an ECO, refer to use case CAAEviEcoManager and refer to CAAEviActionManager to see how Actions and ECRs are created. After the necessary objects are created, the subject interface is used to add the part version to the ECO as an affected object and subsequently remove it.
The ENOVInterfaces interface/methods shown here are:
[Top]
To launch CAAEviAffectedObjects, you will need to set up the build time environment, then compile CAAEviAffectedObjects.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, System, and VPMTpManager frameworks. From the directory where the executable file is stored, enter"CAAEviAffectedObjects" to execute the program. [1].
[Top]
The CAAEviAffectedObjects use case is made of a single file located in the CAAEviAffectedObjects.m module of the CAAENOVInterfaces.edu framework:
Windows | InstallRootDirectory\CAAENOVInterfaces.edu\CAAEviAffectedObjects.m\ |
Unix | InstallRootDirectory/CAAENOVInterfaces.edu/CAAEviAffectedObjects.m/ |
where InstallRootDirectory
is the directory where the CAA CD-ROM
is installed.
[Top]
For demonstration purposes, the code from the CAAEviAffectedObjects use case is shown here. After the preliminary set up of creating the ECO and part version, there are two logical steps:
[Top]
#include "ENOVICWAffectedObjects.h" #include "CATIVpmAFLAffectedObject.h" #include "CATUnicodeString.h" |
These include statements give access to the interfaces demonstrated here.
//--- Add a Part Version as an Affected Object to ECO CATUnicodeString AOType("ENOVIA_CMAFFECTED_OBJECT"); CATIVpmAFLAffectedObject_var AffObj = NULL_var; ENOVICWAffectedObjects_var spAffObj(Eco); rc = spAffObj->AddAffectedObject(partVersion, AOType, AffObj); if (AffObj==NULL_var||rc!=S_OK) { cout << "Failed to Add Affected Object." << endl; VPMSession::CloseSession(); return 7; } cout << "Added Affected Object succesfully." << endl; |
[Top]
#include "ENOVICWAffectedObjects.h" #include "CATIVpmAFLAffectedObject.h" |
These include statements gives access to the operations demonstrated here.
//--- Remove Affected Object from ECO rc = spAffObj->RemoveAffectedObject(AffObj); if (!SUCCEEDED(rc)) { cout << "ERROR in Removing Affected Object." << endl << flush; VPMSession::CloseSession(); return 8; } cout << "Removed Affected Object succesfully." << endl << flush; |
[Top]
Use the ENOVICWAffectedObjects interface available in the ENOVInterfaces framework to add and remove an existing object as an affected object for a Change Management object.
[Top]
[1] | Building and Launching a CAA V5 Use Case |
[Top] |
Version: 1 [Feb 2002] | Document created |
[Top] |
Copyright © 1994-2002, Dassault Systèmes. All rights reserved.