Extensibility > Graphics Builder Automation Interface > Project Functions > ProjectFirst

ProjectFirst

Retrieves the name of the first project defined in Citect SCADA. Can be used in conjunction with ProjectNext to call the projects currently defined in Citect SCADA.

Syntax

ProjectFirst(Project)

Project:

The name of the project.

Return Value

The name of the first Citect SCADA project. If no project exists, an error is returned.

Note: For details on handling return and error values, see Error Handling.

Related Functions

ProjectSelect, ProjectSelected, ProjectNext, ProjectFirstInclude, ProjectNextInclude, ProjectUpgrade, ProjectUpgradeAll, ProjectPackLibraries, ProjectUpdatePages, ProjectPackDatabase, ProjectCompile

Example

On Error Resume Next
sProject = GraphicsBuilder.ProjectSelected
If Err.Number <> 0 Then
Debug.Print "Error in ProjectSelected"
Err.Clear
Else
Debug.Print "Selected project:", sProject
End If
Debug.Print "list of projects:"
sProject = GraphicsBuilder.ProjectFirst
While Err.Number = 0
Debug.Print sProject
sProject = GraphicsBuilder.ProjectNext
Wend

Published June 2018