All Frameworks Class Hierarchy This Framework Previous Next Indexes
MecModInterfaces Interface CATIMmiMechanicalImportApplicative
System.IUnknown
|
+---System.IDispatch
|
+---System.CATBaseUnknown
|
+---CATIMmiMechanicalImportApplicative
Usage: an implementation of this interface is supplied and you must use it as is. You should not reimplement it.
interface CATIMmiMechanicalImportApplicative
Interface to manage an applicative mechanical import (or external reference).
Role: This interface is implemented on external references.
It is used to retrieve link information on a mechanical import (which is obtained by copy with link between two parts).
An authentication process is required prior to retrieving link information.
Before calling any method of this interface, you have to init the authentication mechanism in either of two ways :
- if the import was created using CATMmrInterPartCopy.SetImportApplicativeId or
CATFeatureImportAgent.SetImportApplicativeId to set an applicative identifier (computer-generated UID)
you have to give it using
SetApplicativeId : then this interface allows the user to retrieve the pointed element or the source product of the mechanical import, or
to retrieve the loading status, or to load the pointed element.
- if the StartUp definition of the pointed element of the import is in a catalog (CATFct),
you have to give the correct catalog client id (using
SetPointedElementClientId) : a pre-requisite for this authentication is that the pointed element is already loaded.
It allows the user to retrieve only the pointed element or the source product.
(since the pointed element is already loaded, it explains the irrelevance of retrieving the loading status or to load the pointed element, in this context.)
Method Index
- o
GetPointedElement(CATBaseUnknown_var&)
- Retrieves the pointed element.
- o
GetSourceProduct(CATBaseUnknown_var&)
- Retrieves the product instance which aggregates an instance of the representation of the pointed element.
- o
IsPointedElementLoaded(CATBoolean&)
- Retrieves the loading status of the pointed document.
- o
LoadPointedElement()
- Loads the pointed document containing the pointed element.
- o
SetApplicativeId(GUID&)
- Sets the applicative identifier.
- o
SetPointedElementClientId(CATUnicodeString&)
- Sets the client identifier of the pointed element.
Methods
o GetPointedElement
-
Retrieves the pointed element.
- Parameters:
-
- oPointedElement
- A pointer to the pointed element. It may be a subelement or a feature.
- Returns:
- S_OK if pointed element is returned
E_FAIL
o GetSourceProduct
-
Retrieves the product instance which aggregates an instance of the representation of the pointed element.
- Parameters:
-
- oSourceProduct
- a pointer to the source product instance
- Returns:
- S_OK if the source product is found
E_FAIL
o IsPointedElementLoaded
-
Retrieves the loading status of the pointed document.
Role: This method is used to retrieve the loading status of the pointed document when
SetApplicativeId is called before.
It always fails if
SetPointedElementClientId is used instead of
SetApplicativeId.
- Parameters:
-
- oLoaded
- TRUE if the pointed document is loaded otherwise FALSE
- Returns:
- S_OK if the information is correctly retrieved.
E_FAIL if
SetApplicativeId was not previously successfully called. For
SetPointedElementClientId, irrespective of its success or failure.
o LoadPointedElement
public virtual HRESULT LoadPointedElement( | )= 0 |
-
Loads the pointed document containing the pointed element.
Role: This method is used to load the document that contains the pointed element when
SetApplicativeId is called before.
It always fails if
SetPointedElementClientId is used instead of
SetApplicativeId.
- Returns:
- S_OK if the document is effectively loaded.
S_FALSE if the document is already loaded.
E_FAIL if
SetApplicativeId was not previously successfully called. For
SetPointedElementClientId, irrespective of its success or failure.
o SetApplicativeId
public virtual HRESULT SetApplicativeId( | const GUID& | iApplicativeId) = 0 |
-
Sets the applicative identifier.
Role: Inits the authentication mechanism allowing to retrieve informations on the mechanical import.
You have to give here the identifier of the mechanical import.
If you don't give the correct identifier, all methods of this interface will fail.
- Parameters:
-
- iApplicativeId
- a unique identifier : the applicative identifier
- Returns:
- S_OK if the applicative identifier matches the identifier of the mechanical import
E_FAIL otherwise
o SetPointedElementClientId
-
Sets the client identifier of the pointed element.
Role: Inits the authentication mechanism allowing to retrieve informations on the mechanical import.
You have to give here the client id of the catalog of the pointed element.
If you don't give the correct identifier, all methods of this interface will fail.
The pointed element must be loaded before calling this method.
In order to load it, you have to know the pointed component and open it (you cannot use
LoadPointedElement to load it).
- Parameters:
-
- iClientId
- the client id of the catalog corresponding to the pointed element.
- Returns:
- S_OK if the client id matches the identifier of the StartUp Catalog of the pointed element
E_FAIL if it does not or if the pointed element is not loaded
This object is included in the file: CATIMmiMechanicalImportApplicative.h
If needed, your Imakefile.mk should include the module: CATMecModInterfaces