Submit a ticketCall us

WebinarUpcoming Webinar: Know What’s Changed – with NEW Server Configuration Monitor

Change management in IT is critical. But, even with a good change management process, changes are too often not correctly tracked, if at all. The configuration of your servers and applications is a key factor in their performance, availability, and security. Many incidents can be tracked back to an authorized (and sometimes unauthorized) configuration change, whether to a system file, configuration file, or Windows® Registry entry. Join SolarWinds VP of product management Brandon Shopp to discover how the new SolarWinds® Server Configuration Monitor is designed to help you.

Register now.

Home > Success Center > Kiwi CatTools > Kiwi CatTools Documentation > Kiwi CatTools 3.11 Administrator Guide > API > CatTools API Classes > CatTools DeviceTypes class > Sample Code to list Device Types in CatTools database

Sample Code to list Device Types in CatTools database

Table of contents
No headers
Created by Caroline Juszczak, last modified by Caroline Juszczak on Jun 28, 2016

Views: 139 Votes: 0 Revisions: 1

Sample VB 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

Last modified

Tags

Classifications

Public