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

TrnGetPenNo

Gets the pen number of a pen name. The pens on a trend are either defined in the Page Trends database or set by the TrnSetPen() function.

Syntax

TrnGetPenNo(AN, Tag)

AN:

The AN of the chosen trend.

Tag:

The trend tag.

Return Value

The pen number, or 0 (zero) if an error is detected.

Related Functions

TrnSetPen

Example

/* Assume that 8 trend fonts, Pen1TrendFont ... Pen8TrendFont are 
defined in the Fonts database. The following code will display the 
trend tag using the matching font for that pen. */
! For the trend at AN20
STRING sFont;
INT iPen;
iPen = TrnGetPenNo(20,"PV1");
IF 0 < iPen AND iPen < 9 THEN
sFont = "Pen" + IntToStr(iPen) + "TrendFont";
DspStr(31,sFont,"PV1");
END

See Also

Trend Functions