AnnGetDistance method (Annotation Control)

C++ Builder example

Delphi example

 

Builder Syntax

int AnnGetDistance(HANNOBJECT hObject, double &dDistance, double &dDistance2)

Delphi Syntax

AnnGetDistance (hObject: HANNOBJECT; var dDistance: L_DOUBLE; var dDistance2: L_DOUBLE): L_INT

Overview

Refer to Implementing Annotations.

Remarks

(Document/Medical only) Gets the distance of the ruler in the specified annotation object. The unit of measure is set by calling the AnnSetUnit method.

This method can be called for ANNOBJECT_RULER, ANNOBJECT_CROSSPRODUCT, ANNOBJECT_PROTRACTOR and ANNOBJECT_POLYRULER types of annotation objects. However, please note the following:

If the annotation object is type ANNOBJECT_RULER, then the dDistance parameter is updated with the length of the ruler.

If the annotation object is type ANNOBJECT_CROSSPRODUCT, ANNOBJECT_PROTRACTOR or ANNOBJECT_POLYRULER, then dDistance is updated with the length of the primary ruler and dDistance2 is updated with the length of the second ruler. (This method does not provide a means for getting the lengths of all rulers of a polyruler object. To get that information, AnnGetDistance2 must be called.)

If the annotation object is type ANNOBJECT_CROSSPRODUCT, ANNOBJECT_PROTRACTOR or ANNOBJECT_POLYRULER, the AnnGetDistance2 method provides more information on the length of each ruler, the number of rulers, the unit of measure of each ruler and the total length of all rulers.

To determine the type of an annotation object, call the AnnGetType method.

See Also

Elements

AnnGetDistance2 method

Topics

Annotations: Object Manipulation

 

Using Rulers in Annotation Objects

 

New Annotation Features of Version 14.5