PointGetMultiple (function)

Syntax PointGetMultiple point1[,point2[,point3…]]
Description Request data from up to 30 points in a single snapshot request. If the function fails, an error is generated.
Comments (CimBasic) If you need to get data from several points, use this function rather than issuing a single PointGet command for each point. For the example below, it is six times more efficient to use PointGetMultiple , since the data is retrieved from the Point Manager in a single request, rather than six separate PointGet requests.
Parameter Description
pointn Point objects for which data is going to be requested. Up to 30 may be specified as function parameters.
Example (CimBasic)
sub main()
   Dim x As New Point: x.Id = "R1"
   Dim x1 As New Point: x1.Id = "R2"
   Dim x2 As New Point: x2.Id = "R3"
   Dim x3 As New Point: x3.Id = "R4"
   Dim x4 As New Point: x4.Id = "R5"
   Dim x5 As New Point: x5.Id = "R6"
 
   PointGetMultiple x,x1,x2,x3,x4,x5
End Sub
Comments (.NET) PointGetMultiple has been ported to .NET as follows:
void Cimplicity.PointGetMultiple(Point[] points);
PointGetMultiple takes an array of Point objects, which is different from CimBasic where CimBasic functions take variable arguments with each being a Point object. Otherwise .NET and CimBasic behavior is the same for this function.
Example (.NET)
using System;
using System.Collections.Generic;
using Proficy.CIMPLICITY;
public class PGM
{
  public void Main()
  {
    Point[] array = new Point[3];
    
    using (Point one = new Point(), two = new Point(), three = new Point())
    {
      one.Id = "PGM_01";
      one.OnChange();
      
      two.Id = "PGM_02";
      two.OnChange();
      
      three.Id = "PGM_03";
      three.OnChange();
      
      array[0] = one;
      array[1] = two;
      array[2] = three;
      
      try
      {
        Cimplicity.PointGetMultiple(array);
      
        foreach (Point p in array)
        {
          Cimplicity.Trace(p.Id + " -> " + p.Value.ToString());
        }
      }
      catch (Exception x)
      {
        Cimplicity.Trace("Failure: " + x.Message);
      }
    }
  }
}
See Also PointGet (method)