DefaultAngleUnits Property [Visio 2003 SDK Documentation]

Determines the default unit of measure for quantities that represent angles.

unitsCode = object**.DefaultAngleUnits**

object**.DefaultAngleUnits** = unitsNameOrCode

unitsCode     Variant. The default angle unit.

object     Required. An expression that returns an Application or InvisibleApp object.

unitsNameOrCode     Required Variant. The new default angle unit.

Version added

2002

Remarks

The DefaultAngleUnits property corresponds to the value shown in the Angle box on the Units tab in the Options dialog box (on the Tools menu, click Options).

The return value unitsCode contains one of the values of VisUnitCodes, which are declared in the Microsoft Office Visio 2003 type library.

You can specify unitsNameOrCode as an integer (a member of VisUnitCodes) or a string value such as "degrees". If the string is invalid or the unit code is inappropriate (non-angular), an error is generated.

For a complete list of valid unit strings along with corresponding Automation constants (integer values), see About units of measure.

Cell formulas that contain a specific unit of measure are displayed in those units regardless of the default angle units setting. Many cell formulas, however, use implicit unit syntax and are displayed in default units.

A program can create a cell whose formula is displayed in default units by setting the cell's Formula property to a string in implicit unit syntax. For example, if the formula for the angle of a shape is "=90[deg,A]" , the result is displayed as "90 deg." if the DefaultAngleUnits property is visDegrees, and "1.5708 rad." if the DefaultAngleUnits property is visRadians.

Alternatively, a program can use the following statement to set the cell's result to default angle units:

    vsoCell.Result(visAngleUnits) = 90

In this case, the result is 90 degrees if the DefaultAngleUnits property is visDegrees, and 90 radians if the DefaultAngleUnits property is visRadians.

For details about implicit units of measure, see About units of measure.

Applies to | Application object | InvisibleApp object

See Also | DefaultDurationUnits property | DefaultTextUnits property