Stations.AddEx

This function adds a new Station into the collection (with audit log explanation).

Syntax Parameters Return Value
Function Stations.AddEx( _
    CreateInfo As StationCreateInfo) As Station
CreateInfo [in]

Information about the station being created.

Type: StationCreateInfo

Station

SVB Example

Adding a station:

Sub Main

    Dim oOM As New ObjectManager
    oOM.Reconnect(Application)

    'Set up information about the new station
    Dim stationInfo As New StationCreateInfo
    stationInfo.Name = "Dayton Office"
    stationInfo.AuditLogReason = "Adding Dayton Office"

    'Add the station
    Dim MyStation As Station
    Set MyStation = oOM.Stations.AddEx(stationInfo)

    'Edit the station, and log information about the change
    Dim statUpdateInfo As New StationUpdateInfo
    statUpdateInfo.AuditLogReason = "Adding a description for the Dayton office"
    MyStation.AutoSave = False
    MyStation.Description = "Office located in Dayton"
    MyStation.SaveEx(statUpdateInfo)

    oOM.Disconnect

End Sub