Skip to main content
Version: v4 (Stable)

EnumObject

EnumObject(ObjectType As Integer, ObjectId as Integer, sName As String[, Flag As Integer, Param As Integer/String[, bRelief As Boolean[, StationId As Integer]]]) As Integer

Enumerates all the objects of a given type. If an object is found, its ID is returned in <ObjectId> and its name in <sName> (full tag identifier if data server not specified, else short tag identifier).

The type of the enumerated object is defined by <ObjectType>:

  • 0 = Tags
  • 1 = Alarms
  • 2 = Users
  • 3 = Call groups
  • 4 = Tag groups
  • 5 = Communication drivers
  • 6 = Teams
  • 10 = Stations
  • 23 = Data server groups
  • 26 = Data servers
  • 27 = Scenarios
  • 31 = Call group groupings
  • 36 = Scenario groupings

For the first enumeration, you only have to set the type of object you want to enumerate and initialize the Object ID value to 0. For the next enumeration you should give the last Object ID.

The parameter <Flag> can specify a filter defined in <Param> (object name or OId):

  • Flag = 1: browses objects attached to the user <Param>.
  • Flag = 2: browses objects attached to tag group <Param> (The tag group name must include the parents).
  • Flag = 3: browses objects attached to team <Param>.
  • Flag = 4: browses objects attached to call group <Param>.
  • Flag = 5: browses objects attached to tag group <Param> (Tag group name without parent).
  • Flag = 6: browses objects attached to data server <Param>.
  • Flag = 8: returns the tag name instead the tag reference.
  • Flag = &h10: browses OPC tags.
  • Flag = &h20: browses DDE tags.
  • Flag = &h30: browses other tags.
  • Flag = &h40: browses driver tags.
  • Flag = &h80: browses only tags attached to the data server (default value).
  • Flag = &h100: browses masked alarm tags.

The optional parameter <bRelief> returns the relief status of the returned user in the specified group or team.

The optional <StationId> parameter allows filtering the search for the defined station (StationId). If omitted or set to 0, the search is performed across all stations.

Returns 0 if the object is found or an error code.