Point (object)

Overview The Point object provides an object-oriented interface to CIMPLICITY real-time point data. Through the object, you may set and read point values. Methods are supplied to receive the point value as it changes, periodically, or when the alarm state changes.
Example 1
Dim MyPoint as new Point  ' Creates a new empty point object
2
Dim ThisPoint as Point    ' Creates a pointer to a point object
Set ThisPoint = MyPoint   ' Now the two object are equal (BCE)
Notes In the above example, a point object is created two different ways.
1 Uses a new keyword; this is typically the method you will use. This constructs a point object, at which time you can set the ID of the point and use it.
2 Creates a reference to a point and sets it to empty.
A runtime error will occur if you attempt to access methods of the object, since it is currently unassigned. You can assign the reference to a particular object by using the SET command. In general, you will use this with the PointGetNext function, which takes a list of point objects and returns the first one that changes.
Important: Point objects in .NET scripting must be explicitly disposed of by doing either of the following:
  • Calling the Point.Dispose() method
  • Putting them inside the using block.
Failing to do so will freeze the IDE when the script is finished running.