Lifecycle Applications |
Engineering Change Management |
The Links InterfaceCreating and Deleting Links between Objects |
Use Case |
AbstractThis article shows how to use the ENOVICWLinks interface of the ENOVInterfaces framework to add and remove links between existing Change Management objects, i.e., Engineering Change Orders, Actions, and Engineering Change Requests. |
This use case is intended to show you how to add links between existing ECOs, Actions, and ECRs. You will learn how to add a Design Action, to an existing Engineering Change Order as a deliverable. You would use this operation if for example a certain Action has to be completed to accomplish a project or a product modification. The required action is attached as a deliverable to an ECO which controls the project or modification. The ECO cannot be released until the deliverable is completed, ensuring that all necessary work is accomplished.
You will also learn how to link one ECO to another related ECO. You would use this link to attach a prerequisite ECO, that is, an ECO that must be completed before the linking ECO can be completed. Similarly, a Hierarchy link can be used to attach a whole tree of ECOs that represent the total work that must be completed before the controlling or parent ECO can be completed.
Finally, you will learn how to link two Actions together. The ENOVInterfaces framework contains the interface ENOVICWLinks which allows you to directly add and remove links between an existing Actions and ECOs.
[Top]
CAAEviLinks is a use case of the CAAENOVInterfaces.edu framework that illustrates how you use the ENOVICWLinks interface to add and remove links between existing ECOs and Actions.
[Top]
CAAEviLinks begins by opening a VPM session and creating a login a session. Then the ECO and Action Managers are retrieved. To set up the demonstration, two ECOs are created with the necessary parameters as well as a Design Action and a Manufacturing Action. For more information on how to create ECOs and Actions, refer to use cases CAAEviEcoManager and CAAEviActionManager. After the necessary objects are created, the ENOVICWLinks interface is used to add and remove the links between ECOs and Actions.
The ENOVInterfaces interface/methods shown here are:
[Top]
To launch CAAEviLinks, you will need to set up the build time environment, then compile CAAEviLinks.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 "CAAEviLinks" to execute the program. [1].
[Top]
The CAAEviLinks use case is made of a single file located in the CAAEviLinks.m module of the CAAENOVInterfaces.edu framework:
Windows | InstallRootDirectory\CAAENOVInterfaces.edu\CAAEviLinks.m\ |
Unix | InstallRootDirectory/CAAENOVInterfaces.edu/CAAEviLinks.m/ |
where InstallRootDirectory
is the directory where the CAA CD-ROM
is installed.
[Top]
For demonstration purposes, the code from the CAAEviLinks use case is shown here. After the preliminary set up of creating the ECOs and Actions, there are five logical steps:
[Top]
#include "ENOVICWLinks.h" #include "CATIVpmAFLLink.h" #include "CATUnicodeString.h" |
These include statements give access to the interfaces demonstrated here.
//--- Create Related EC Link (Prerequisite) from Eco1 to Eco2 CATUnicodeString RelLinkType("ENOVIA_V506ec_prerequ"); CATIVpmAFLLink_var RelECLink = NULL_var; ENOVICWLinks_var spLink(Eco1); rc = spLink->CreateRelatedEcLink(RelLinkType, Eco2, RelECLink); if (RelECLink==NULL_var||!SUCCEEDED(rc)) { cout << "ERROR in creating Related EC Link." << endl << flush; VPMSession::CloseSession(); return 6; } cout << "Created Related EC Link successfully." << endl << flush; |
[Top]
#include "ENOVICWLinks.h" #include "CATIVpmAFLLink.h" |
These include statements give access to the interfaces demonstrated here.
//--- Create Hierarchy Link from Eco1 to Eco2 CATIVpmAFLLink_var HierLink = NULL_var; rc = spLink->CreateEcHierarchyLink(Eco2, HierLink); if (HierLink==NULL_var||!SUCCEEDED(rc)) { cout << "ERROR in create Hierarchy Link." << endl << flush; VPMSession::CloseSession(); return 7; } cout << "Created Hierarchy Link successfully." << endl << flush; |
[Top]
#include "ENOVICWLinks.h" #include "CATIVpmAFLLink.h" |
These include statements give access to the interfaces demonstrated here.
//--- Create a Deliverable Link from Eco1 to the Design Action CATIVpmAFLLink_var LinkObj = NULL_var; boolean IsPaste = FALSE; rc = spLink->CreateDeliverableLink(DsgAct, LinkObj, IsPaste); if (LinkObj==NULL_var||!SUCCEEDED(rc)) { cout << "ERROR to Add Deliverable Link." << endl << flush; VPMSession::CloseSession(); return 8; } cout << "Created Deliverable Link successfully." << endl << flush; |
[Top]
#include "ENOVICWLinks.h" #include "CATIVpmAFLLink.h" #include "CATUnicodeString.h" |
These include statements give access to the interfaces demonstrated here.
//--- Create a Parent Link from Design Action to Mfg Action CATUnicodeString LinkType("ENOVIA_AFLParent"); CATIVpmAFLLink_var ActLink = NULL_var; ENOVICWLinks_var spLnk(DsgAct); rc = spLnk->CreateNewLink(LinkType, MfgAct, ActLink); if (ActLink==NULL_var||!SUCCEEDED(rc)) { cout << "ERROR in Create Link from Design Action to Mfg Action." << endl << flush; VPMSession::CloseSession(); return 9; } cout << "Created Parent Link from Design Action to Mfg Action successfully." << endl; |
[Top]
#include "ENOVICWLinks.h" #include "CATIVpmAFLLink.h" |
These include statements give access to the interfaces demonstrated here.
//--- Remove Parent Link from Design Action to Mfg Action rc = spLnk->RemoveLink(ActLink); if (!SUCCEEDED(rc)) { cout << "ERROR in removing Parent Link." << endl << flush; VPMSession::CloseSession(); return 10; } cout << "Removed Parent Link between Actions successfully." << endl << flush; |
[Top]
Use the ENOVICWLinks interface available in the ENOVInterfaces framework to add and remove links on existing Actions and ECOs.
[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.