The Annotation Text Token Table

This feature applies to the text annotation objects that support tokens, namely the following:

image\sqrblit.gif ANN_OBJECT_AUTOMATION,

image\sqrblit.gif ANN_OBJECT_BUTTON,

image\sqrblit.gif ANN_OBJECT_NOTE,

image\sqrblit.gif ANN_OBJECT_TEXT,

image\sqrblit.gif ANN_OBJECT_TEXTPOINTER,

image\sqrblit.gif ANN_OBJECT_STAMP,

A token is a special text string that can be translated into another more meaningful text string. For example, a user may wish to display the current date or the name of their company in their text annotations. Rather than type out the date or the name of the company, a text token can be typed instead.

Tokens are two-character strings of the form:

#{any character}

Any token (except for ##) can be defined to mean anything. LEAD defines the following set of constants to represent functions that can be mapped to any token.

[0] ANN_TOKEN_NONE

String not treated as a token

[1] ANN_TOKEN_SEPARATOR

Add a separator to the automation token menu

[2] ANN_TOKEN_TEXT

A text string

[3] ANN_TOKEN_DATE_YYYY

Current four digit year

[4] ANN_TOKEN_DATE_YY

Current two digit year

[5] ANN_TOKEN_DATE_MM

Two digit representation of current month

[6] ANN_TOKEN_DATE_DD

Two digit representation of current day

[7] ANN_TOKEN_DATE_MONTH_NAME

Current month name (for example, January)

[8] ANN_TOKEN_DATE_DAY_OF_WEEK

Current day of week (for example, Monday)

[9] ANN_TOKEN_TIME_HH_12

Current hour,using a 12 hour clock

[10] ANN_TOKEN_TIME_HH_24

Current hour, using a 24 hour clock

[11] ANN_TOKEN_TIME_MM

Current minute (00-59)

[12] ANN_TOKEN_TIME_SS

Current second (00-59)

[13] ANN_TOKEN_TIME_MILLISECONDS

Current milliseconds (000-999)

[14] ANN_TOKEN_AM_PM

Time of day indicator (AM or PM)

LEAD defines a predefined text token table that you can use, or you can define your own. The predefined text tokens table is listed below.

Default Text Token Table

#Y

"Four digit year"

#y

"Two digit year"

#M

"Two digit month"

#d

"Two digit day"

#N

"Month Name"

#D

"Day of week name"

#h

"Current time: 12-Hour (01-12),

#H

"Current time: 24-Hour (00-23),

#m

"Current time: minutes"

#s

"Current time: seconds"

#f

"Current time: milliseconds "

#t

"Current time: AM or PM"

##

"#"

The text token table is displayed in the automation text dialog. The following figure displays the default text token table.

image\TokenTable1.gif

The default annotation text token table can be easily changed using the following:

AnnClearTextTokenTable

AnnDeleteTextTokenTable

OnAnnEnumerateTextTokenTable

AnnTextExpandTokens

AnnInsertTextTokenTable

AnnClearTextTokenTable to remove all tokens from the text token table.

AnnDeleteTextTokenTable to delete a text token from the annotation text token table.

AnnEnumerateTextToken to enumerate the text tokens in the text token table.

AnnTextExpandTokens to get and set the text expand token property of an annotation.

AnnInsertTextTokenTable to insert a text token into the text token table.

Additionally, you can define your own user-defined text tokens. User-defined text tokens can consist of new text strings, or any combination of existing text tokens. The following figure displays a user-defined text token table.

image\TokenTable2.gif