ISCModelObjectCollection Interface
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:
|
For information about valid object class names and identifiers, see the HTML document erwin Metamodel Reference, in the Metamodel Reference Bookshelf located in the 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 © 2025 Quest Software, Inc. |