AnnSmartUnit property (Annotation Control)

C++ Builder example

Delphi example

 

Builder Syntax

unsigned AnnSmartUnit[unsigned uIndex]

Delphi Syntax

AnnSmartUnit [uIndex: L_UINT]: L_UINT

Overview

Refer to Implementing Annotations.

Remarks

(Read only) Gets an array of values that represents the unit of measure for each ruler length in the AnnDistance property. This property is updated by the AnnGetDistance2 method. Possible values are:

ANNUNIT_INCHES

0

ANNUNIT_FEET

1

ANNUNIT_YARDS

2

ANNUNIT_MICROMETERS

3

ANNUNIT_MILLIMETERS

4

ANNUNIT_CENTIMETERS

5

ANNUNIT_METERS

6

ANNUNIT_TWIPS

7

ANNUNIT_POINTS

8

ANNUNIT_PIXELS

9

Please note that if AnnRulerUnit (i) is ANNUNIT_SMART_METRIC or ANNUNIT_SMART_ENGLISH, then the actual unit of measure for the ruler length in AnnDistance (i) can be found in AnnSmartUnit (i). If AnnRulerUnit (i) is not ANNUNIT_SMART_METRIC or ANNUNIT_SMART_ENGLISH, then both AnnRulerUnit (i) and AnnSmartUnit (i) contain the unit of measure.

A "smart unit" is a unit that can be automatically promoted to the next higher unit.

For example, suppose you have a ruler that is 13 inches long. If the units of the ruler are ANNUNIT_INCHES, then the length is 13. However, if the units of the ruler are ANNUNIT_SMART_ENGLISH, then the length of the ruler is automatically promoted to feet. The length in this case would be 1.0833 feet.

See Also

Elements:

AnnGetDistance2 method, AnnTotalDistance property, AnnTotalRulerUnit property, AnnTotalSmartUnit property, AnnDistance property, AnnRulerUnit property, AnnDistanceCount property

Topics:

Annotations: Object Manipulation

 

Using Rulers in Annotation Objects