AnnSetUnit method (ILEADRasterAnnotation)

Visual Basic example

Visual C++ 5.0 example

 

Syntax

short AnnSetUnit(long hObject, short nUnit, BSTR pszUnitAbbrev, short nPrecision, VARIANT_BOOL bSelected);

Overview

Refer to Ruler Annotation Object.

Remarks

(Document/Medical only) Sets the unit of measurement for objects that use rulers.

The following annotation objects utilize one or more rulers as part of the annotation:

ANN_OBJECT_RULER

ANN_OBJECT_POLYRULER

ANN_OBJECT_PROTRACTOR

ANN_OBJECT_CROSSPRODUCT

In addition, the Automation object stores ruler settings along with the other object default settings.

The default unit of measure for ruler, polyruler, and crossproduct objects is smart English. With the smart units, the unit changes with the length. For example, if the length is 11 inches (assuming the default precision of 2 is being used), "11.00 in" displays whereas if the length is 15 inches, "1 ft 3.00 in" displays. Call the AnnSetUnit method to set the unit of measurement and its precision for the ruler. The precision indicates how many digits to display to the right of the decimal point in the length. Call the AnnGetUnit method to fill the AnnUnit Property with the unit of measurement and its precision for the ruler. The AnnGetDistance2 method gets the length of each ruler that makes up an object, and the total length of all rulers.

Refer to AnnAutomation property.

If the value of the AnnContainer property is passed as the hObject parameter, the method will modify all the annotations in the container depending on the value of bSelected parameter.

If the value of the AnnAutomation property is passed as the hObject parameter, the method will modify the default values used whenever an annotation is created.

See Also

Elements

AnnGetFillModeExt method, AnnSetFillModeExt method, AnnFillMode property, AnnAlpha property, AnnSetOptions method, AnnGetOptions method, AnnSetTextOptions method, AnnGetTextOptions method, AnnShowText property, AnnShowBorder property, AnnTextColor property, AnnAutoSnapCursor property, AnnTextEdit method, AnnShowRotateHandles property, AnnGetRotateOptions method, AnnSetRotateOptions method, AnnCalibrateRuler method, AnnGetUnit method, AnnSetGaugeLength method, AnnSetBitmapDpiX method, AnnGetBitmapDpiX method, AnnGetBitmapDpiY method, AnnSetBitmapDpiY method, AnnGetDistance method, AnnGetGaugeLength method, AnnTicMarkLength property

Topics

Annotations (Document/Medical only): Object Manipulation

 

Using Rulers in Annotation Objects

 

New Annotation Features of Version 14.5

 

Calibrating Annotation Ruler Objects