The following table contains information on the ISCModelObjectCollection interface:
Signature |
Description |
Valid Arguments |
---|---|---|
ISCModelObject * Item(VARIANT nIndex, VARIANT Class [optional]) |
Returns an IUnknown pointer for a Model Object component identified by the nIndex parameter |
nIndex:
Class:
|
Note: For information about valid object class names and identifiers, see the HTML document ERwin Metamodel Reference, in the Metamodel Reference Bookshelf located in the CA ERwin Data Modeler installation folder.
Example 9
The following example illustrates how to access a specific object using C++. The example uses a Session object from Example 6:
void GetObject(ISCSessionPtr & scSessionPtr, CString & csID) { ISCModelObjectCollectionPtr scModelObjColPtr = scSessionPtr->GetModelObjects(); ISCModelObjectPtr scObjPtr = scModelObjColPtr->GetItem(COleVariant(csID)); // … }
The following example illustrates how to access a specific object using Visual Basic .NET. The example uses a Session object from Example 6:
Public Sub GetObject(ByRef scSession As SCAPI.Session, ByRef objID As String) Dim scObjCol as SCAPI.ModelObjects Dim scObj as SCAPI.ModelObject scObjCol = scSession.ModelObjects scObj = scObjCol.Item(objID) ' retrieves object with given object ID End Sub
Copyright © 2016 CA Technologies.
All rights reserved.
|
|