Cicode Programming Reference > Cicode Function Categories > Trend Functions Introduction > TrnSetScale

TrnSetScale

Sets a new scale for a trend pen. In the automatic scaling mode, the zero and full scales are automatically generated.

Syntax

TrnSetScale(AN, Pen, Percent, Scale)

AN:

The AN where the trend is located. Set to -1 for all trends on the current page.

Pen:

The trend pen number:

-1 - All pens

0 - The pen currently in focus

1...8 - Pen1...Pen8

Percent:

The scale mode:

-2 - Set both zero and full scales to the default scales.

-1 - Place the trend into automatic scale mode.

0 - Set the zero scale.

100 - Set the full scale.

Scale:

The new value of the scale. Scale is ignored if Percent is -2.

Return Value

0 (zero) if successful, otherwise an error is returned.

Related Functions

TrnGetScale, TrnEcho, TrnSetScale

Example

! For the trend at AN20
TrnSetScale(20,-1,100,5000.0);
! Sets the full scale of all pens to 5000.0

See Also

Trend Functions