Lifecycle Applications |
Engineering Change Management |
The Configured Views InterfaceWorking with Effectivities and Product Views |
Use Case |
AbstractThis article shows how to use the ENOVICWConfiguredViews interface of the ENOVInterfaces framework to add a configured view in Change Management. A configured view is added to an Engineering Change Order as an Effectivity and added to an Action as a Product View. |
This use case is intended to show you how to add an existing configured view to Change Management objects. In this case, a product is added to an existing Engineering Change Order as an Effectivity and to an Action as a Product View. You would use this operation if for example you would like to direct the modification of a certain group of a product that was manufactured within a specified time range, has a specific configuration, or has certain serial numbers. The product is attached to the ECO as an Effectivity object and the ECO controls the modification of the specified group. The Product View ensures that the required action is performed on a specific set of products. The product must be a configurable object with a configured view. The ENOVInterfaces framework contains the interface ENOVICWConfiguredViews which allows you to directly add an Effectivity to an ECO and a Product View to an Action.
[Top]
CAAEviConfiguredViews is a use case of the CAAENOVInterfaces.edu framework that illustrates how you use the ENOVICWAffectedObjects interface to add and remove an Effectivity for an existing Engineering Change Order. It also shows how to add and remove a Product View for an existing Action.
[Top]
CAAEviConfiguredViews begins by opening a VPM session and creating a login a session. Then the Eco Manager and Action Manager are retrieved. To set up the demonstration, an ECO and an Action are created with the necessary parameters as well as a product and configured view. For more information on how to create an ECO, refer to use case CAAEviEcoManager, and to CAAEviActionManager for information on how to create an Action. After the necessary objects are created, the subject interface is used to add the product's configured view to the ECO as an Effectivity and to the Action as a Product view. Then, the interface is used to remove the Effectivity and Product View.
The ENOVInterfaces interface/methods shown here are:
[Top]
To launch CAAEviConfiguredViews, you will need to set up the build time environment, then compile CAAEviConfiguredViews.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"CAAEviConfiguredViews" to execute the program. [1].
[Top]
The CAAEviConfiguredViews use case is made of a single file located in the CAAEviConfiguredViews.m module of the CAAENOVInterfaces.edu framework:
Windows | InstallRootDirectory\CAAENOVInterfaces.edu\CAAEviConfiguredViews.m\ |
Unix | InstallRootDirectory/CAAENOVInterfaces.edu/CAAEviConfiguredViews.m/ |
where InstallRootDirectory
is the directory where the CAA CD-ROM
is installed.
[Top]
For demonstration purposes, the code from the CAAEviConfiguredViews use case is shown here. After the preliminary set up of creating the ECO, Action, and product as a configured view, there are four logical steps:
[Top]
#include "ENOVICWConfiguredViews.h" #include "CATIEnovCMEffectivity.h" #include "CATUnicodeString.h" |
These include statements give access to the interfaces demonstrated here.
//---Add a CMEffectivity to the ECO CATUnicodeString prodName("MyProduct"); CATUnicodeString EffId("MyEffectivity"); CATIEnovCMEffectivity_var ecoEff = NULL_var; ENOVICWConfiguredViews_var spCfgView(Eco); rc = spCfgView->AddNewEcoEffectivity(CV1, prodName, EffId, ecoEff); if (ecoEff==NULL_var||!SUCCEEDED(rc)) { cout << "ERROR in adding Effectivity to ECO." << endl << flush; VPMSession::CloseSession(); return 12; } cout << "Added Effectivity to ECO successfully." << endl << flush; |
[Top]
#include "ENOVICWConfiguredViews.h" #include "CATIEnovCMEffectivity.h" |
These include statements give access to the interface demonstrated here.
//---Remove Effectivity from the ECO rc = spCfgView->RemoveEcoEffectivity(ecoEff); if (!SUCCEEDED(rc)) { cout << "ERROR in removing Effectivity from ECO." << endl << flush; VPMSession::CloseSession(); return 13; } cout << "Removed Effectivity from ECO successfully." << endl << flush; |
[Top]
#include "ENOVICWConfiguredViews.h" #include "CATIVpmAFLProductView.h" #include "CATUnicodeString.h" |
These include statements give access to the interface demonstrated here.
//--- Add an AFLProdView to the Action CATIVpmAFLProductView_var AFLPV = NULL_var; CATUnicodeString productName("MyProduct"); CATUnicodeString AddToObjType("ENOVIA_AFLAction"); ENOVICWConfiguredViews_var spCV(Action); rc = spCV->AddAFLProdView(CV2, productName, AddToObjType, AFLPV); if (AFLPV==NULL_var||!SUCCEEDED(rc)) { cout << "ERROR in adding Product View to Action." << endl << flush; VPMSession::CloseSession(); return 14; } cout << "Added Product View to Action successfully." << endl << flush; |
[Top]
#include "ENOVICWConfiguredViews.h" #include "CATIVpmFactoryObject.h" |
These include statements give access to the interfaces demonstrated here.
//---Remove AFLProdView from the Action CATIVpmFactoryObject_var factObj(CV2); rc = spCV->RemoveAFLProdView(factObj); if (!SUCCEEDED(rc)) { cout << "ERROR in removing Product View from Action." << endl << flush; VPMSession::CloseSession(); return 15; } cout << "Removed Product View from Action successfully." << endl << flush; |
[Top]
Use the ENOVICWConfiguredViews interface available in the ENOVInterfaces framework to add an existing configured view object to an existing ECO as an Effectivity or to an Action as a Product View. The same interface is used for removal of the configured view.
[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.