Syntax
|
Point.GetArray
array [
,
startElement [
,
endElement [
,
fromElement]]]
|
Description
|
To retrieve an array point's values directly into a Basic array using Engineering Units Conversion if applicable. There are several rules to keep in mind:
- If the array is undimensioned, the array will be re-dimensioned to the same size as the point.
- If the array is dimensioned smaller than the point, only that many elements will be copied into the array.
- If the array is larger than the point, all elements of the point are copied, and the rest of the array is left as is.
If the startElement is specified, the function will start copying data into the array at this element and will continue until the end of the point is reached or the array is full whichever occurs first.
If the endElement is specified, the function will stop copying data into the array after populating this element or when the end of the point is reached.
If the fromElement is specified, the values copied into the array start at this element in the point array and continue as described above.
Note: You must get the point value using the
Get
or
GetNext
method prior to using the
GetArray
method. The
GetArray
method does not retrieve the current value from the Point Manager. Instead, it retrieves the current value in the Point Object, which was generated during the last
Get
or
GetNext
. See the example below.
|
Comments
|
Parameter
|
Description
|
|
array
|
Array. A dimensioned or un-dimensioned Basic Array to which the point data will be copied.
|
|
startElement
|
Integer. (optional) The first array element to which data will be copied.
|
|
endElement
|
Integer. (optional) The last array element to which data will be copied.
|
|
fromElement
|
Integer. (optional) The first point element from which data is to be copied.
|
Example
|
Sub Main()
Dim values() as integer
Dim p as new Point ' Declare the point object
p.Id = "ARRAY_POINT" ' Set the Id
p.Get ' Get value from CIMPLICITY
p.GetArray values ' Copy the object into values
End Sub
|
See Also
|
Point.SetArray (method); Point.GetRawArray (method); Point.HasEuConv (property, read); Point.Value (property, read/write); Point.RawValue (property, read/write).
|