virtual L_INT LAnnAutomation::SetUnit(uUnit, pUnitAbbrev, uPrecision, uFlags=0)
Sets the unit of measurement for the rulers used by those objects that use rulers.
The unit of measure of the ruler. Possible values are:
|ANNUNIT_SMART_METRIC|| Smart Metric|
|ANNUNIT_SMART_ENGLISH|| Smart English|
|ANNUNIT_DISPLAY|| Display (1/100 inch)|
|ANNUNIT_DOCUMENT|| Document (1/300 inch)|
Character string containing the unit abbreviation string to be displayed after the distance. You can pass NULL to get the default abbreviations for the current unit of measurement.
Number of digits to be displayed after the decimal place.
Reserved for future versions, use 0.
|SUCCESS||The function was successful.|
|< 1||An error occurred. Refer to Return Codes.|
The following annotation objects utilize one or more rulers as part of the annotation:
In addition, the Automation object (ANNOBJECT_AUTOMATION) stores default ruler settings along with the other object default settings.
To determine the unit of measure for each ruler as well as its precision, call the LAnnAutomation::GetUnit function or the LAnnRuler::GetUnit function. 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 LAnnAutomation::SetUnit or the LAnnRuler::SetUnit function 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.
Refer to Annotation Automation Object.
For an example, refer to LAnnAutomation::GetDistance.
Medical Web Viewer .NET
.NET, Java, Android, and iOS/macOS Assemblies
C API/C++ Class Libraries