Documentation forKiwi CatTools

Kiwi CatTools API: Groups class

The Groups class is used to enumerate CatTools Group objects.

Properties

Count

Returns the number of device types in your database.

Methods

Items

The collection of Group objects.

Refresh

Resyncronise with the database.

Sort

Sort the collection of Group objects in ascending or descending order.

You can only enumerate Groups you can not add edit or delete them using this object. To add a Group simply give the text value to your Device and when it is saved the Group will be created.

Groups sample code

The following sample Visual Basic code shows you how to list the Groups found in your database using the CatTools API.

Dim DB As CatToolsAPI.Database
Dim Groups As CatToolsAPI.Groups
Dim Group As CatToolsAPI.Group

Set DB = New CatToolsAPI.Database

DB.OpenConnection
If DB.Connected Then
	Set Groups = DB.Groups
	If Not Groups Is Nothing Then
		Debug.Print Groups.Count & " groups in the database"
		For Each Group In Groups
			Debug.Print "->" & Group.Name
			DoEvents
		Next
	Else
		Msgbox "Error:" & DB.ErrDescription
	End If
Else
	Msgbox "Connection failed: " & DB.ErrDescription
End If

DB.CloseConnection
Set Group = Nothing
Set Groups = Nothing
Set DB = Nothing