All Frameworks  Class Hierarchy  This Framework  Previous  Next  Indexes

System Interface CATIVBExtension

System.IUnknown
  |
  +---System.IDispatch
    |
    +---System.CATBaseUnknown
      |
      +---CATIVBExtension
 

Usage: you can freely reimplement this interface.


interface CATIVBExtension

Interface to implement in order to extend the V5 Automation object model using the CATIABase::GetItem mechanism.
The CATIABase.GetItem mechanism offers a generic way to extend the V5 Automation object model with custom Automation interfaces. It is the preferred way to achieve such extensions. Script developers use the GetItem mechanism in the following manner:

 ' VBA sample
 Dim X As MyAutomationInterface
 ' Retrieve the extension object associated to Y under the key "MyCATIVBExtensionImpl"
 Set X = Y.GetItem("MyCATIVBExtensionImpl")
 
Please note that the CATIABase.GetItem mechanism is implemented by the CATBaseObject class (the CATIABase interface adaptor) or CATBaseCollection class (the CATIACollection interface adaptor), so make sure your Y class derives from either of these adaptors. For implementations which override the CATIABase.GetItem method, the overriding implementation must make sure to first invoke the implementation of its superclass. If the implementation of the superclass fails to retrieve the proper Automation extension, then the overriding implementation can use its own algorithm to retrieve it.


Method Index


o GetObjects(CATBaseUnknown*,CATBaseDispatch*&)
Returns the extension object associated to the iGetItemTarget Automation object.

Methods


o GetObjects
public virtual HRESULT GetObjects(CATBaseUnknown* iGetItemTarget,
CATBaseDispatch*& oGetItemResult) const = 0
Returns the extension object associated to the iGetItemTarget Automation object.
Parameters:
iGetItemTarget
The Automation object on which GetItem is invoked.
oGetItemResult
The Automation extension object returned by GetItem.
Returns:
S_OK if the object is extension object is successfully instantiated, E_FAIL otherwise

This object is included in the file: CATIVBExtension.h
If needed, your Imakefile.mk should include the module: JS0GROUP

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