core

#### Example of Using PARAM to Change the Gauge's Value

You can also use the REPORT/CUSTOM command with PARAM statements to change a gauge's value. Suppose you want to change the gauge percentage based on an input comment in PC-DMIS.

1. Add the 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.

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

C1=COMMENT/INPUT,NO,FULL SCREEN=NO,

Type a percentage:

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

PARAM/GAUGE1.VALUE=C1.INPUT

PARAM/=

ENDCUSTOM/

Executing the above code stores a number value from the input comment into the C1.INPUT variable. It then looks for a custom report named "MyCustomReport".

Notice the PARAM statement. It modifies an object named Gauge1. It then uses a VALUE property to set the gauge's value equal to the value stored in the C1.INPUT variable.