PointList Example


The following code exercises the PointList collection's Add and Merge methods.


   Const server1 = "localhost"
   Const server2 = "godzilla"
   Private Sub Command1_Click()
      Dim foo As PointList, bar As PointList
      Dim pt As PIPoint
      Debug.Print "Making a pointlist with 2 points" 
      Set foo = New PointList 
      foo.Add Servers(server1).PIPoints("sinusoid") 
      foo.Add Servers(server2).PIPoints("sinusoid") 
      dumplist foo 
      Debug.Print "Merging" 
      Set bar = New PointList 
      bar.Add Servers(server1).PIPoints("sinusoidu") 
      foo.Merge bar 
      dumplist foo 
   End Sub

   Private Sub dumplist(theList As PointList)
      Dim pt As PIPoint
      Debug.Print "count = " & theList.Count 
      For Each pt In theList 
         Debug.Print " " & pt.PathName 
   End Sub
Enabling Operational Intelligence