Lifecycle Applications |
Engineering Change Management |
The Attachments InterfaceAdding and Removing Attachments |
Use Case |
AbstractThis article shows how to use the ENOVICWAttachments interface of the ENOVInterfaces framework to add and remove existing object as an attachment for a Change Management object such as an Engineering Change Order, Action or Engineering Change Request. |
This use case is intended to show you how to add and remove an existing object, in this case a part version, to an existing Engineering Change Order as an attachment. The technique is the same for Actions and Engineering Change Request.Attachments are usually connected to objects as a reference or for information purposes. An attachment can be almost anything including documents, links, parts, or other Engineering Change Orders and Actions. The ENOVInterfaces framework contains the interface ENOVICWAttachments which allows you to directly add an attachment to and remove from a Change Management object.
[Top]
CAAEviAttachments is a use case of the CAAENOVInterfaces.edu framework that illustrates how you use the ENOVICWAttachments interface to add an attachment to and remove from an existing Engineering Change Order.
[Top]
CAAEviAttachments 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. After the necessary objects are created, the subject interface is used to add the part version to the ECO as an attachment. Then the attachment is subsequently removed from the ECO.
The ENOVInterfaces interface/methods shown here is:
[Top]
To launch CAAEviAttachments, you will need to set up the build time environment, then compile CAAEviAttachments.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"CAAEviAttachments" to execute the program. [1].
[Top]
The CAAEviAttachments use case is made of a single file located in the CAAEviAttachments.m module of the CAAENOVInterfaces.edu framework:
Windows | InstallRootDirectory\CAAENOVInterfaces.edu\CAAEviAttachments.m\ |
Unix | InstallRootDirectory/CAAENOVInterfaces.edu/CAAEviAttachments.m/ |
where InstallRootDirectory
is the directory where the CAA CD-ROM
is installed.
[Top]
For demonstration purposes, the code from the CAAEviAttachments use case is shown here. After the preliminary set up of creating the ECO and part version, there are two logical steps:
[Top]
#include "ENOVICWAttachments.h" #include "CATIVpmAFLAttachment.h" #include "CATUnicodeString.h" |
These include statements give access to the interfaces demonstrated here.
//--- Add a Part Version as an Attachment to ECO CATUnicodeString AttName("MyAttachment"); CATUnicodeString Description("This is a CAA Attachment"); CATIVpmAFLAttachement_var AttObj = NULL_var; ENOVICWAttachments_var spAtt(Eco); rc = spAtt->AddNewAttachment(AttName, Description, partVersion, AttObj); if (AttObj==NULL_var||!SUCCEEDED(rc)) { cout << "ERROR in Adding Attachment." << endl << flush; VPMSession::CloseSession(); return 7; } cout << "Added Attachment succesfully." << endl << flush; |
[Top]
#include "ENOVICWAttachments.h" #include "CATIVpmAFLAttachment.h" |
These include statements give access to the interfaces demonstrated here.
//--- Remove Attachment from ECO rc = spAtt->RemoveAttachment(AttObj); if (!SUCCEEDED(rc)) { cout << "ERROR in Removing Attachment." << endl << flush; VPMSession::CloseSession(); return 8; } cout << "Removed Attachment succesfully." << endl << flush; |
[Top]
Use the ENOVICWAttachments interface available in the ENOVInterfaces framework to add or remove an existing object as an attachment for Change Management objects (ECOs, Actions, ECRs).
[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.