Unit Types and Format Options

Here is a question from Matt Mason and some exhaustive research results by Saikat Bhattacharya of Autodesk on unit types and their format options.

To provide some context, UnitType is an enumeration listing all the unit types supported by Revit. The FormatOptions class is used to manage information for the ProjectUnit.FormatOptions property, which returns a FormatOptions instance containing the user's current project unit settings for each UnitType queried. Through the project units and the format options management, each unit type is associated with one FormatOptions instance, which provides the following properties and values:

In this context, Matt asks:

Question: When attempting to get the FormatOptions for a given UnitType, I am getting exceptions for certain UnitTypes:

Some of these might be related to the fact that I am running the Revit Architecture flavour, but it is not clear to me that all of these are based on Revit flavour issues. Are some of these legacy or otherwise invalid types?

Answer: Saikat created the following mapping of the list of unit types provided with the disciplines in RAC as well as RME. Most of the unit types listed below belong to the MEP flavour of Revit and thus do not throw an exception in RME:

After contacting the engineering team for more details, he compiled a more comprehensive list including 80 unit types with their format option groups and names, and additional notes on some of them. Here is a spreadsheet ProjectUnit.csv with the complete mapping in a neutral comma delimited CSV format.

After reviewing these results, Matt adds a note that the four 'special' unit types DecSheetLength, SheetLength, Number, and SiteAngle are 'fixed' and will throw an exception if you attempt to access them in any Revit Flavour. Saikat adds: As mentioned in the CSV file, there are more than the four special cases that Matt refers to as 'special'. The CSV file contains others which apply to all disciplines and also cannot be edited, which Matt refers to as 'fixed', and includes some notes on each of them.