ISCPersistenceUnitCollection Interface
The following table contains information on the ISCPersistenceUnitCollection interface:
|
Signature |
Description |
Valid Arguments |
|---|---|---|
|
ISCPersistenceUnit * Add(VARIANT Locator, VARIANT Disposition [optional]) |
Adds a new persistence unit to the unit collection |
Locator:
Disposition:
|
Detailed descriptions of the location and format of the Disposition parameters is located in the appendix API Interfaces Reference.
Example 5
The following example illustrates how to open an existing model using C++. The example uses the Application object created in Example 1:
ISCPersistenceUnitPtr OpenModel(ISCApplicationPtr & scAppPtr, CString & csFullPath)
{
ISCPersistenceUnitCollectionPtr scPUnitColPtr;
scPUnitColPtr = scAppPtr->GetPersistenceUnits();
ISCPersistenceUnitPtr scPUnitPtr = scPUnitColPtr- >Add(COleVariant(csFullPath));
return scPUnitPtr;
}
The following example illustrates how to open an existing model using Visual Basic .NET. The example uses the Application object created in Example 1:
Public Function OpenModel(ByRef scApp As SCAPI.Application, _
fullModelPath As String) As SCAPI.PersistenceUnit
Dim scPersistenceUnitCol as SCAPI.PersistenceUnits
scPersistenceUnitCol = scApp.PersistenceUnits
OpenModel = scPersistenceUnitCol.Add(fullModelPath)
End Sub
|
Copyright © 2025 Quest Software, Inc. |