Create a Series of Data Values

The XY Plot control object model provides you with methods to add, retrieve and remove one or more series of data values from its configuration. :

Example 1. Create a Series through the XY Plot Control Object Model

Series name: Series 1 (displays in an XY Plot control object in a CimView screen)

Scripting purpose: Create a series through an XY Plot Control object model

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.

' Add the series:

cimOleObj.Series.Add "Series 1", apSeriesStandard

Example 2. Create a Series through an Object Other Than the XY Plot Control Object:

Series name: Series 1 (displays in an XY Plot control object in a CimView screen)

Scripting purpose: Create a series through and object other than the XY Plot Control object model

Procedure:

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

  2. Display the General tab.

  3. Enter XY in the Object name field.

  4. Open the CimEdit Properties dialog box for and object that is not an XY Plot control.

  5. Display the Edit Script tab.

  6. Write the following Basic excerpt within a subroutine.

' Access the XY Plot control object:

Dim xyPlot As CimGraphLib.DCimGraph

Dim screenObjects As GefObjects

Set screenObjects = CimGetScreen().Object.Objects

Set xyPlot = screenObjects("XY").OleObject

' Add the series:

xyPlot.Series.Add "Series 1", apSeriesStandard

More information

About plotting XY data.