Push 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:

For

You can use:

Single (1 element) points

GetValue or a combination of Get and Value to get a single value and push it into a series.

Array points

GetSafeArray or a combination of Get and SafeArray to get a single value and push it into a series.

Example (Get and Value) for Single Points

To push the values of two single points

Option 1

Use the following format to push the values of single points using GetValue:

CimPairData.Push Point.GetValue, Point.GetValue

Option 2

Use the following format to push the values of two points using a combination of Get and Value:

Point.Get

CimPairData.Push Point.Value, Point.Value

Example (GetSafeArray or Get and SafeArray ) for Array Points

To push the values of two array points:

Option 1

Use the following format to push the values of two points using GetSafeArray.

CimPairData.Push Point.GetSafeArray, Point.GetSafeArray

Option 2

Use the following format to push the values of two points using a combination of Get and SafeArray.

Point.Get

CimPairData.Push Point.SafeArray, Point.SafeArray

Scripting examples for setting single and array values include:

Example 1. Push Single Point Values into a Series

Series name: Series 1

Script purpose: Push the single values of two CIMPLICITY points into Series 1

Procedure:

  1. Open the CimEdit Properties dialog box for the XY Plot control object.

  2. Display the Edit Script tab.

  3. Write the following Basic excerpt within a subroutine.

' Get two point values:

Dim x As New Point

x.Id ="X_POINT"

Dim y As New Point

y.Id ="Y_POINT"

' Push the data into the series object:

cimOleObj.Series("Series 1").Data.Push x.GetValue, y.GetValue

Example 2. Push Arrays Values through the End of a Series Vectors

Series name: Series 1

Script purpose: Push the array values of two CIMPLICITY points into Series 1

Procedure:

  1. Open the CimEdit Properties dialog box for the XY Plot control object.

  2. Display the Edit Script tab.

  3. Write the following Basic excerpt within a subroutine.

' Get two point values:

Dim x As New Point

x.Id ="X_ARRAY_POINT"

Dim y As New Point

y.Id ="Y_ARRAY_POINT"

' Get the series object:

Dim series as CimSeries

Set series = cimOleObj.Series("Series 1")

' Push the array data into the series object:

series.Data.Push x.GetSafeArray, y.GetSafeArray

More information

Scripting examples for XY plots.