Kiwi CatTools API: DeviceTypes class
The DeviceTypes class is used to enumerate CatTools DeviceType objects.
Properties
Count |
Returns the number of device types in your database. |
Methods
Items |
The collection of Device objects. |
Refresh |
Resyncronise with the database. |
Sort |
Sort the collection of DeviceType objects in ascending or descending order. |
DeviceTypes sample code
The following sample Visual Basic code showing you how to list the Device Types found in your database using the CatTools API.
Dim DB As CatToolsAPI.Database Dim DeviceTypes As CatToolsAPI.DeviceTypes Dim DeviceType As CatToolsAPI.DeviceType Set DB = New CatToolsAPI.Database DB.EncryptionPassword = "" DB.OpenConnection If DB.Connected Then Set DeviceTypes = DB.DeviceTypes If Not DeviceTypes Is Nothing Then Debug.Print DeviceTypes.Count & " device types in the database" For Each DeviceType In DeviceTypes Debug.Print "->" & DeviceType.Name DoEvents Next Else Msgbox "Error:" & DB.ErrDescription End If Else Msgbox "Connection failed: " & DB.ErrDescription End If DB.CloseConnection Set DeviceType = Nothing Set DeviceTypes = Nothing Set DB = Nothing