|Pushes a single or array values into the data value vector.|
Data As VARIANT* - Specifies the value. This value can be a single variable or array value of any of the following types, as long as it results in a numeric value:
|Description:||CimData.Push allows you to insert
one or more data values through the end of the data vector. This
method is similar to CimPairData.Push. It differs in that
it pushes the data into the X or
the Y vector individually. This
is very useful if you want to push X data without having to push Y
data or vice versa. Pushing data is particularly useful if your
series plots a continuous flow of data.
Example of continuous flow of data
A function curve such as cosine of an incremental variable.
Example on pushing data values
You have the following data values:
You push the following data values:
The data values are now the following:
The first four values have been removed from the vector because its size is fixed.
The following CimView script excerpt pushes an integer and a double value into Series 1:
The following CimView script excerpt creates an array of variant values and an array of double values and pushes them into Series 1:
Pushing Values from Points
CimEdit Scripts provide you with a type called Point. Point can be used to set and get CIMPLICITY point management information. For single (1 element) points you can use GetValue or a combination of Get and Value to get a single value and push it into a series. For array points you can use GetSafeArray or a combination of Get and SafeArray to get a single value and push it into a series.
The following CimView script excerpt pushes the single values of two CIMPLICITY points into Series 1:
The following CimView script excerpt pushes the array values of two CIMPLICITY HMI points into Series 1: