CATSysExtendItf Interface CATIAutomationExtension
Usage: you can freely reimplement this interface.
interface CATIAutomationExtension
Interface to extend the V6 Automation object model.
Role: The mechanism offers a generic way to extend the V6 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 "MyCATIAutomationExtensionImpl"
Set X = Y.GetItem("MyCATIAutomationExtensionImpl")
-
Y is any script object which derives from
or
. Such objects can be either native V6 Automation objects such as Viewer or Part or custom objects.
-
MyCATIAutomationExtensionImpl is the name of a V6 implementation object which implements
. MyCATIAutomationExtensionImpl is responsible for instantiating the Automation extension object which will ultimately be returned by
method. Note that the MyCATIAutomationExtensionImpl object itself is instantiated using
the
mechanism, so it must also implement the
interface in a code extension.
-
X is the Automation extension object, of type MyAutomationInterface. It
is associated to the Y object and is the result of invoking the
on Y with the MyCATIAutomationExtensionImpl key.
Please note that the
mechanism is implemented by the
class (the
interface adaptor) or
class (the
interface adaptor), so make sure your Y class derives from either of these adaptors.
For implementations which override the
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 with the given Automation object.
Methods
o GetObjects
public virtual GetObjects( | | iGetItemTarget, |
| | oGetItemResult) |
-
Returns the extension object associated with the given 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: CATIAutomationExtension.h
If needed, your Imakefile.mk should include the module: JS0VBEXT
Copyright © 1999-2014, Dassault Systèmes. All rights reserved.