core

#### Example of using PARAM to Display Data on the Graph

You can also use the REPORT/CUSTOM command with PARAM statements to specify the graph's data points.

1. Add the Graph object into one of the editors and size it as needed.

2. Right-click on it, choose Properties, and make a note the Object Name property value.

3. Set XDivisions to 5.

4. Set YDivisions to 5.

5. Set DataPointColor property to red (255.0.0).

6. Set L ineWidth to 8.

7. Inside PC-DMIS, add code similar to the following:

CS1=REPORT/CUSTOM, FILENAME=MyCustomReport, Section=-1

PARAM/GRAPH1.SETVALUES=0

PARAM/GRAPH1.XVALUE=0.25

PARAM/GRAPH1.YVALUE=-0.4

PARAM/GRAPH1.SETVALUES=1

PARAM/GRAPH1.XVALUE=0.65

PARAM/GRAPH1.YVALUE=0.-0.3

PARAM/GRAPH1.SETVALUES=1

PARAM/GRAPH1.XVALUE=0.75

PARAM/GRAPH1.YVALUE=0.45

PARAM/GRAPH1.SETVALUES=1

PARAM/=

Executing the above code looks for a custom report named "MyCustomReport/.

Notice the PARAM statements in the REPORT command. They each modify an object named Gauge1 and they use these properties to modify the graph:

XVALUE - This defines the X axis location of the data point on the graph.

YVALUE - This defines the Y axis location of the data point on the graph.

SETVALUES - This can be either 0 or 1. A value of 0 resets the list of data points. A value of 1 adds the data point to the list.

The resulting graph looks like this: