3D PLM Enterprise Architecture

ENOVIA V5 Integration

Display Name customization

Retrieving information about existing object
Use Case

Abstract

 


What You Will Learn With This Use Case

Using the CATIPDMUEDocumentName interface, the name displayed in CATIA V5 for ENOVIA V5 documents can be customized.

This use case will focus solely on the CATIPDMUEDocumentName interface implementation. For more information on

·          how to activate Attribute Mapping, refer to VPM Navigator documentation

·          how to retrieve ENOVIA V5 attributes using CAA APIs, refer to ObjectModelerBase and Knowledge CAA documentation

[Top]

The DisplayName Use Case

The CAAE5iUEDocumentName is a use case of the CAAProductStructureE5i.edu framework that illustrates how to change display name in CATIA in accordance with an ENOVIA V5 Data Customization.

[Top]

What Does CAAE5iUEDocumentName Do

The goal of CAAE5iUEDocumentName is to demonstrate how default document names can be overridden.

The use case is composed of two parts:

·          One part is the code implementing CATIPDMUEDocumentName.

·          The other part is the XML file used to declare the mapping of ENOVIA V5 document attributes in CATIA.

[Top]

How to Launch CAAE5iUEDocumentName

To launch CAAE5iUEDocumentName, you will need to set up the build time environment, then compile CAAE5iUEDocumentName along with its prerequisites, set up the run time environment, and then execute the use case [1] in the following way:

1.       Set the current directory to InstallRootDirectory/CAAProductStructureE5i.edu

2.       Set up  the build time environment and build the following module: CAAE5iUEDocumentName.m

3.       edit file InstallRootDirectory/CAAProductStructureE5i.edu/CNext/code/dictionary/CAAProductStructureE5i.edu.dico: uncomment the following line
#CATUEPDMDocumentName      CATIPDMUEDocumentName      libCAAE5iUEDocumentName

4.       Install the run time environment by executing the command mkCreateRuntimeView

5.       Run CNEXT on the command line

6.       In the Tools + Options window, select the General + Compatibility + ENOVIA V5 tab page

7.       Activate the "Work with Attribute Mapping" checkbox and use the "." button next to the "Attribute Mapping File" entry field to locate the InstallRootDirectory/CAAProductStructureE5i.edu/CNext/Data.d/DV_Version_Status.xml file

8.       Connect to ENOVIA V5 using the command on Enovia V5 Toolbar. Important: step 7 MUST be done before connecting to ENOVIA V5. Otherwise you will need to stop CATIA and restart.

9.       Search for an ENOVIA V5 document


 

10.   Open the document in CATIA V5. The title bar of the document should show the customized name: the document's name should now be suffixed with "_revXXX(YYY)" where XXX is the document's ENOVIA revision and YYY is the document's ENOVIA status.

[Top]

Where to Find the CAAE5iUEDocumentName Code

 

Windows InstallRootDirectory\CAAProductStructureE5i.edu

·          the code implementing CATIPDMUEDocumentName can be found in CAAE5iUEDocumentName.m\src\CAAE5iUEDocumentName.cpp

·          the corresponding dictionary entry can be found in CNext\code\dictionary\CAAProductStructureE5i.edu.dico

·          the XML file used to declare the mapping of ENOVIA V5 document attributes in CATIA can be found in CNext\Data.d\DV_Version_Status.xml

Unix InstallRootDirectory/CAAProductStructureE5i.edu

·          the code implementing CATIPDMUEDocumentName can be found in CAAPbiUEDocumentName.m/src/CAAPbiUEDocumentName.cpp

·          the corresponding dictionary entry can be found in CNext/code/dictionary/CAAProductStructureE5i.edu.dico

·          the XML file used to declare the mapping of ENOVIA V5 document attributes in CATIA can be found in CNext/Data.d/DV_Version_Status.xml

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

[Top]

Step-by-Step

The implementation of the CAAE5iUEDocumentName use case includes the following steps:

# Step Where
1 Map attributes V_version and V_status Attribute Mapping file
2 Implement the User Exit C++ source, dictionary file
3 Compute the document display names C++ Source

[Top]

Map attributes V_version and V_status

The DV_Version_Status.xml Attribute Mapping file declares that the ENOVIA V5 Document Revision's attributes V_version and V_status must be mapped into CATIA.

This means the attributes will be made available in the CATIA session in the Document Properties window, and via the CATOmbDocPropertyServices API. E.G. the V_status attribute declared above will be created in the CATIA V5 document under the name ENOVIA5.DocumentStatus.

  <AttributeName="DocumentStatus"Type="STRING">

       <CATIAInfoName="ENOVIA5.DocumentStatus"Editable="No"Visible="Yes"/>

       <DBInfoName="V_status" LCASubEntity="DV"Editable="Yes"Visible="Yes"DefaultValue="_"/>

  </Attribute>

Implement the User Exit

The CAAE5iUEDocumentName.cpp code is a user exit program; I.E. CATIA V5 calls this code when a document name is needed.

To do this, CATIA instanciates a CATObject with late type CATUEPDMDocumentName and queries it for the interface CATIPDMUEDocumentName.

This is why CAAE5iUEDocumentName.cpp declares

1.    its late type is CATUEPDMDocumentName:

CATImplementClass( CAAE5iUEDocumentName, DataExtension, CATBaseUnknown, CATUEPDMDocumentName );

2.       it implements CATIPDMUEDocumentName:

#include "TIE_CATIPDMUEDocumentName.h"
 TIEchain_CATIPDMUEDocumentName(CAAE5iUEDocumentName);

Additionally the CAAProductStructureE5i.edu.dico file declares the implementation of CATIPDMUEDocumentName in the following line:

CATUEPDMDocumentName      CATIPDMUEDocumentName      libCAAE5iUEDocumentName

Compute the document display names

Based on the CATDocument and CATOmbDocPropertyServices APIs, CAAE5iUEDocumentName.cpp retrieves the values of the ENOVIA V5 Document Revision's attributes V_version and V_status attributes, and generates the document name to be displayed.

CATOmbDocPropertyServices::GetValue(docId, "ENOVIA5.DocumentVersion.Value", version);

[Top]

In Short

This use case has demonstrated how ENOVIA V5 document names can be customized by implementing the CATIPDMUEDocumentName interface to compute the name based on ENOVIA V5 document attribute values.

Alternative implementations can be designed, based on different characteristics of the CATIA V5 document, such as part attributes mapped by Attribute Mapping, for CATPart or CATProduct type documents.

 

[Top]


References

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

History

Version: 1 [Apr 2006] Document created
[Top]

Copyright © 2006, Dassault Systèmes. All rights reserved.