3D PLM PPR Hub Open Gateway

PDM Object Hub

Customizing Effectivity Domain On Export

Implementing The UE_EH_MH_integration User Exit

Use Case

Abstract

This article discusses the CAAEiiCustomDomain use case which shows how to select a particular effectivity domain when exporting data from ENOVIA to DELMIA IPD.


What You Will Learn With This Use Case

This use case shows how the UE_EH_MH_integration user exit can be implemented.

[Top]

The CAAEiiCustomDomain Use Case

CAAEiiCustomDomain is a use case of the CAAENOVEdeIntegrationItf.edu framework. It gives an example on how to implement  the UE_EH_MH_integration user exit that is called by the export tools.

[Top]

What Does CAAEiiCustomDomain Do

The goal of CAAEiiCustomDomain is to select a particular effectivity domain name by implementing the UE_EH_MH_integration user exit. This is necessary when exporting to DELMIA IPD that only supports a single domain, when many can be defined in ENOVIA. By default, ENOVIA will select the first effectivity domain if there is no customization.

[Top]

How to Launch CAAEiiCustomDomain

To launch CAAEiiCustomDomain, you will need to

[Top]

Where to Find the CAAEiiCustomDomain Code

CAAEiiCustomDomain code is located in the CAAEiiCustomDomain.m use case module of the CAAENOVEdeIntegrationItf.edu framework:

InstallRootDirectory/CAAENOVEdeIntegrationItf.edu/CAAEiiCustomDomain.m

where InstallRootDirectory is the root directory of your CAA V5 installation. It consists of one source file named CAAEiiCustomDomainUserExit.cpp and one header file named CAAEiiCustomDomainUserExit.h.

[Top]

Step-by-Step

There are two logical steps in CAAEiiCustomDomain:

  1. Implementing the UE_EH_MH_integration User Exit
  2. Updating the Interface Dictionary

We will now comment each of these steps by looking at the code.

[Top]

Implementing the UE_EH_MH_integration User Exit

First we need to define the CAAEiiCustomDomainUserExit class deriving from CATBaseUnknown with a Get_EffectivityDomain method. Below is the class definition from the CAAEiiCustomDomainUserExit.h header file. Please note that the copy constructor and the assignment operator are declared as private to prevent the compiler from defining it as public by default. This is to avoid extensions being directly instantiated by the application.

class CAAEiiCustomDomainUserExit: public CATBaseUnknown
{
  CATDeclareClass;
  public:
  // Standard constructors and destructors for an implementation class
  // -----------------------------------------------------------------
     CAAEiiCustomDomainUserExit ();
     virtual ~CAAEiiCustomDomainUserExit ();
    /**
     * Implements a function from an interface.
     * @see ENOVEdeIntegrationItf.ENOVIExUE_EH_MH_integration#Get_EffectivtiyDomain
     */
     HRESULT Get_EffectivtiyDomain (CATUnicodeString &  oDomain) ;
  private:
  // The copy constructor and the equal operator must not be implemented
  // -------------------------------------------------------------------
  CAAEiiCustomDomainUserExit (CAAEiiCustomDomainUserExit &);
  CAAEiiCustomDomainUserExit& operator=(CAAEiiCustomDomainUserExit&);
};

Next we will look at the CAAEiiCustomDomainUserExit.cpp source file.

First, CAAEiiCustomDomainUserExit is declared as a CodeExtension to the UE_EH_MH_integration late type using the CATImplementClass macro:

CATImplementClass( CAAEiiCustomDomainUserExit,
                   CodeExtension,
                   CATBaseUnknown,
                   UE_EH_MH_integration );

Second, our implementation is TIEd to the ENOVIExUE_EH_MH_integration interface with:

#include "TIE_ENOVIExUE_EH_MH_integration.h"
TIE_ENOVIExUE_EH_MH_integration( CAAEiiCustomDomainUserExit);

Lastly, we implement the Get_EffectivityDomain method to do what we want, that is always returning "Manufacturing Effectivity" as domain:

HRESULT CAAEiiCustomDomainUserExit::Get_EffectivtiyDomain (CATUnicodeString & oDomain)
{
	//return the desired domain name 
	oDomain = CATUnicodeString("Manufacturing Effectivity");
	return S_OK;
}

 

[Top]

Updating the Interface Dictionary

Next we use the CAAENOVEdeIntegrationItf.edu.dic interface dictionary to register what the shared library is actually implementing. It is located in the following directory:

InstallRootDirectory/CAAENOVEdeIntegrationItf.edu/CNext/code/dictionary/

It must be edited (by removing the leading comment character) to contain the line

UE_EH_MH_integration ENOVIExUE_EH_MH_integration libCAAEiiCustomDomain

This indicates that the UE_EH_MH_integration component implementing the ENOVIExUE_EH_MH_integration interface is located in the libCAAEiiCustomDomain shared library, the one our CAAEiiCustomDomain.m module should be creating.

Once the dictionary is edited, it must be installed in the ../code/dictionary directory of the CAAENOVEdeIntegration.edu framework, either by copying it or by issuing the mkCreateRuntimeView command.

[Top]


In Short

This use case has demonstrated how to select a particular effectivity domain when exporting data to DELMIA IPD.

[Top]


Reference

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

History

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

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