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 numberunit 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 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 floatingpoint 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 "20041220T23:00:00".
If a unit of measure is explicitly set, and if it is different from the default unit for the cell, Microsoft 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 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.
The values of these unit types are expressed as floatingpoint values in inches (internal units). Therefore, a value of "2 feet" would be expressed as:
<Width Unit='FT'>24</Width>
A value of "12 points" would be expressed as:
<Width Unit='FT'>24</Width>
Note 

Units of measure that represent an area (acre and hectare) are expressed in square inches. 
Unit  Description 

AC  Acre 
C  Ciceros 
C_D  Ciceros/didots 
CM  Centimeters 
D  Didots 
DL  Default length units 
DP  Default page units 
DT  Default type units 
F_I  Feet/inches 
FT  Feet 
HA  Hectare 
IN  Inches 
IN_F  Inchesfractional 
KM  Kilometers 
M  Meters 
MI  Miles 
MI_F  Milesfractional 
MM  Millimeters 
NM  Nautical miles 
P  Picas 
PT  Points 
P_PT  Picas/points 
YD  Yards 
Values of this unit type are expressed as floatingpoint values in elapsed days. (Days are the internal units for time). For example, the C element below contains the elapsed days between the dates stored in the A and B elements.
<A Unit='DATE' F='Date(1969,9,12)'>19690912T00:00:00</A> <B Unit='DATE' F='Date(1969,9,13)'>19690913T00:00:00</B> <C Unit='ED' F='Scratch.B1Scratch.A1'>1</C>
Unit  Description 

DE  Default duration days 
ED  Elapsed days 
EH  Elapsed hours 
EM  Elapsed minutes 
ES  Elapsed seconds 
EW  Elapsed weeks 
Values of this unit type are expressed as string values written out in the ISO 8601 format:
<code language="XML" type="developer">yyyymmddThh:mm[:ss[.ss]]</code>
Note 


For example:
yyyymmddThh:mm[:ss[.ss]]
Unit  Description 

DATE  Date and time 
Values of these unit types are expressed as strings. The following table provides an example of each unit type.
Unit  Description  Example 

BOOL  Boolean  An integer that can be 0 (FALSE) or 1 (TRUE). For example: <A Unit='BOOL'>1</A> 
COLOR  A color value  A color value is specified by its red, green, and blue (RGB) components or its index within the document color table. The value can appear as a hash (#) followed by a 6digit hexadecimal number or as an integer value between 0 and 23. For example, the color green would appear as follows: <A Unit='COLOR'>#00FF00</A> A color at index 3 of the ColorEntry element would appear as follows: <A Unit='COLOR'>3</A> 
CY  Currency  <A Unit='CY'>####.####xxx</A> where ####.#### is the amount and xxx is the ISO 4217 currency symbol. For example, $234.45 in U.S. dollars would appear as follows: <A Unit='CY'>234.4500USD</A> 
GUID  A globally unique identifier  A string that represents a globally unique identifier (GUID). For example: <A Unit='GUID'>{4A1A00467A0D439599CA9939AD2D567E}</A> 
MULTIDIM  Multidimensional value  <A Unit='MULTIDIM'>###unit^pow</A> where ### is a floatingpoint value, unit is one of the floatingpoint units of measure (area, angle, distance, duration, or typographical) as previously described, and pow is a power. For example, 12 cubic feet would appear as: <A Unit='MULTIDIM'>1728 IN^3</A> 
NUM  Number  Expressed as a floatingpoint value. 
NURBS  NURBS curve data  Expressed in the same format as a formula with a NURBS (nonuniform rational Bspline) function: NURBS(knotLast, degree, xType, yType, x1, y1, knot1, weight1, ...) <E Unit='NURBS'>NURBS(2.3,2,0,0,0.6,1.1,0,1)</E> 
PER  Percent  Expressed as a floatingpoint value between 0 and 1. For example, 50% would appear as: <A Unit='PER'>0.5</A> 
PNT  2D coordinate  <A Unit='PNT'>PNT(x unit, y unit )</A> where x and y are floatingpoint values and unit is one of the floatingpoint units of measure (area, angle, distance, duration, or typographical) described earlier. For example, <A Unit='PNT'>PNT(2,3)</A> 
POLYLINE  Polyline point data  POLYLINE function: POLYLINE(xType, yType, x1, y1...) <E Unit='POLYLINE'>POLYLINE(0,0,0,1)</E> 
STR  String  <A Unit='STR'>some string</A> where some string is a PCDATA string. 