Show AllShow All

Units of Measure

In general, the formulas of cell elements that represent some numeric value (for example, the shape position, a dimension, or an angle) require a number-unit pair that consists of a number and the unit type that is needed to interpret the number. In DatadiagramML, however, even though the unit type information is stored, the value of an element is expressed in whatever the appropriate internal units are for that value. An internal unit is the unit of measure used by Microsoft Office Visio to represent a particular type of value and is the value Visio writes to DatadiagramML files.

For example, values representing units that are a measurement of length are expressed as floating-point numbers in inches, because the inch is the internal unit used by Visio to represent length. Therefore, if an element has a value of "2 feet", its Unit attribute is 'FT' for "feet" and its value is the number 24.

Other units, such as date/time, are expressed as formatted strings. In the case of date/time, the unit is a string, such as "2004-12-20T23:00:00".

If a unit of measure is explicitly set, and if it is different from the default unit for the cell, Microsoft Office Visio writes out the Unit attribute in DatadiagramML files. If no Unit attribute is present in an element that represents a cell, Visio will use the default unit for that element.

For more information about how units of measure work in Visio, see About units of measure in the Microsoft Office Visio ShapeSheet Reference.

The following tables describe valid units of measure and provide information about internal units and how they are expressed in a DatadiagramML file.

ShowArea, distance, and typographical units of measure

ShowAngular units of measure

ShowDuration units of measure

ShowDate/time units of measure

ShowMiscellaneous units of measure

©2003-2004 Microsoft Corporation. All rights reserved. Permission to copy, display and distribute this document is available at: http://msdn.microsoft.com/library/en-us/odcXMLRef/html/odcXMLRefLegalNotice.asp