XPAC Reference Guide

Specifying the annotation using the field expression field

Specifying the annotation using the field expression field

Previous topic Next topic  

Specifying the annotation using the field expression field

Previous topic Next topic  

You can use the Field/Expression field/s in the Annotation tab to specify up to two annotations for each block in a spatial data plot:

Annotation tab - Field Expression fields

Annotations are typically used to display data field values and/or record names, for example:

Annotation tab - Displaying Record Names

You can either:

select a database field from the drop-down list; or
type an expression.

Selecting a data field

Select a database field from the Field/Expression drop-down list to determine the annotation/s that XPAC displays on the spatial data plot. For example, if you select Imported Insitu Coal Thickness, XPAC displays this database value for each block in the plot.

Typing an expression

You can also type an expression into the Field/Expression drop-down list to specify the annotation that displays in the plot. You must use an expression that returns a value or string for each record in the plot range. If the range that you are using in the plot refers to upper level records, then XPAC displays values for upper level records.

Information

The Field/Expression field also lets you use XCM functions or commands, provided you can fit it on a single line.

See Annotation expression examples for more information.

Using conditional expressions

A conditional expression returns one of two values, based on whether a condition is true or false.

Note

You can use the IIf function to use a conditional expression (instead of using an If...Then...Else...End If control structure, which requires you to create a data field and write an XCM).

You can use the following general format to produce a conditional expression:

IIf(Condition, Value if Condition True, Value if Condition False)

Condition is an expression which returns either a True or a False
Value if Condition True is the value to return if the Condition returns a value of True
Value if Condition False is the value to return if the Condition returns a value of False.

Note

The Value if Condition True and Value if Condition False must both return a valid expression. Both are evaluated, even if only one of them is returned.

See Annotation expression examples for more information.

Specifying the direction of the annotation text

The Annotation Direction Field/Expression field lets you specify the orientation of the annotation text. You can either:

select a database field from the drop-down list
type an expression; or
specify an angle.

Specifying the angle of the annotation text

You can specify the direction of the annotation text that displays in a spatial data plot by typing an angle value into the Annotation Direction Field/Expression field:

Annotation tab - Annotation Direction Field Expression
For example, you can display annotations in a normal text direction by typing 90 into the Annotation Direction Field/Expression field:

Annotation tab - Annotation Direction - Normal

Otherwise, you can specify any other angle to display text in a particular orientation. For example, to display annotations in a downwards-facing direction, type 180 into the Annotation Direction Field/Expression field:

Annotation tab - Annotation Direction - Downwards

Note

By default, XPAC assumes a normal text direction.

You can only specify one text direction for annotations.
If required, you can assign a different annotation text direction for each block by storing this information in a data field in the Main database. You can then select this field from the Annotation Direction Field/Expression drop-down list. You may also be able to use data fields that have been set up to store the mining direction to specify the annotation direction.
If you decide to use an expression to specify the orientation of the annotation text, ensure that the expression returns a value or string for each record in the plot range.
Typically, a 180 degree angle is used to display annotation text.