Point.SetRawArray (method)

Syntax

Point.SetRawArray array [, startElement [, endElement [, fromElement]]]

Description

To set an array point's values directly from a Basic array, bypassing Engineering Units Conversion.

Comments

There are several rules to keep in mind:

If the array is dimensioned smaller than the point, only that many elements will be copied into the point.

If the array is larger than the point, all elements of the point are set.

If the startElement is specified, the function will start copying data from the array at this element and will continue until the end of the array is reached or the point is full whichever occurs first.

If the endElement is specified, the function will stop copying data from the array after copying this element or when the point is full.

If the fromElement is specified, the values copied from the array start at this element in the point array and continue as described above.

 

Parameter

Description

 

array

Array. A dimensioned or undimensioned Basic Array from which the point data will be copied.

 

startElement

Integer. (optional) The first array element from which data will be copied.

 

endElement

Integer. (optional) The last array element from which data will be copied.

 

fromElement

Integer. (optional) The first point element to which data is to be copied.

Example

' Copy the log value of one array point to another array point.

sub main()

   Dim source as new Point   ' Declare source point

   Dim dest as new Point     ' Declare destination point

   Dim x() as double         ' Declare array

   source.Id ="INPUT"       ' Set the ID of the source point

   source.Get                ' Get the value of the source point

   dest.Id ="OUTPUT"        ' Set the ID of the destination point

   source.GetRawArray x      ' Transfer value to array

   ' Loop through array point, taking logarithm.

   for I = 0 to source.Elements - 1

      x(I) = log(x(I))

   next I

   dest.SetRawArray x        ' Transfer value into destination object

   dest.Set                  ' Set the value to CIMPLICITY

end sub

See Also

Point.SetArray (method); Point.RawValue (property, read/write); Point.GetRawArray (method).

Note

The SetRawArray method only updates the internal value of the point object. The Set method must be executed to write the value out to the CIMPLICITY project.

More information

CIMPLICITY Extensions to Basic