Submit a ticketCall us

Solarwinds & Cisco Live! Barcelona
Join us from the 29th of January to the 2nd of February at Cisco Live 2018 in Barcelona, where we will continue to show how monitoring the network with SolarWinds will keep you ahead of the game. At our booth (WEP 1A), we will demonstrate how SolarWinds network solutions can help. As a bonus, we are also hosting a pre-event webinar - Blame the Network, Hybrid IT Edition with our SolarWinds Head Geek™, Patrick Hubbard on January 24th - GMT (UTC+0): 10:00 a.m. to 11:00 a.m. There's still time to RSVP.

Home > Success Center > Kiwi CatTools > Kiwi CatTools 3.11 Administrator Guide > API > CatTools API Classes > CatTools Devices class > Sample Code to iterate devices using the CatTools API

Sample Code to iterate devices using the CatTools API

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

Views: 131 Votes: 0 Revisions: 1

Sample VB code showing you how to iterate devices using the CatTools API.

 

Dim DB As CatToolsAPI.Database

Dim Devices As CatToolsAPI.Devices

Dim Device As CatToolsAPI.Device

 

Set DB = New CatToolsAPI.Database

 

DB.OpenConnection

If DB.Connected Then

Set Devices = DB.Devices

Debug.Print Devices.Count & " devices in the database"

For Each Device In Devices

If Device.Group = "Default" then

Debug.Print Device.Name & " " & Device.HostAddress

End If

DoEvents

Next

Else

Debug.Print "Connection failed: " & DB.ErrDescription

End If

 

DB.CloseConnection

 

Set Device = Nothing

Set Devices = Nothing

Set DB = Nothing

Last modified

Tags

Classifications

Public