Returns the list of connected projects. | |
Syntax: | SCODE = object.GetProjectList ( projectList ) |
Parameters: |
projectList
As VARIANT* - Pass in an
existing CoCimSafeArray3 object. It
will be filled in with an array of VARIANTs containing the project
names. (Note: In VBScript and VBA/VB, you may pass a Variant and
this function will return a native array.)
|
Description: | browser.GetProjectList returns the list of
connected projects. Returns S_OK if the list was returned. Returns
S_FALSE if there was an error. Example Dim i As Variant Dim errorCode As Long Dim errorString As String Dim low As Long Dim high As Long Dim projectArray As Variant Set projectArray =
CreateObject("CIMPLICITY.CimSafeArray.3") i = browser.GetProjectList(projectArray) If CInt(i) = 0 Then projectArray.GetArrayBounds 1, low,
high For j = low To high MsgBox "Project " + CStr(j) + " = " +
projectArray.Element(j) Next Else i = browser.LastError(errorCode,
errorString) MsgBox "Error code = " + CStr(errorCode) + ",
Error string = " + errorString End If |