Changes in 2021 vs 2020 8 added 6 changed
Flip API Versions →Added in 2021 (new since 2020)
Format(Units, ForgeTypeId, Double, Boolean)
Format(Units, UnitType, Double, Boolean, FormatValueOptions)
Format(Units, UnitType, Double, Boolean)
Format(Units, ForgeTypeId, Double, Boolean, FormatValueOptions)
TryParse(Units, ForgeTypeId, String, ValueParsingOptions, Double%, String%)
TryParse(Units, ForgeTypeId, String, Double%, String%)
TryParse(Units, ForgeTypeId, String, Double%)
TryParse(Units, ForgeTypeId, String, ValueParsingOptions, Double%)
Changed members
UnitFormatUtils.Format(Units, UnitType, Double, Boolean, Boolean, FormatValueOptions)
No longer obsolete in 2020 (was obsolete in 2021)
| units | Units | The units formatting settings, typically obtained from <a href="/2020/9ed56178-e9ae-b4bc-1c0e-e6a867ae3557">Document.GetUnits()</a>. |
| unitType | UnitType | The unit type of the value to format. |
| value | Double | The value to format, in Revit's internal units. |
| maxAccuracy | Boolean | True if the value should be rounded to an increased accuracy level appropriate for editing or understanding the precise value stored in the model. False if the accuracy specified by the FormatOptions should be used, appropriate for printed drawings. |
| forEditing | Boolean | True if the formatting should be modified as necessary so that the formatted string can be successfully parsed, for example by suppressing digit grouping. False if unmodified settings should be used, suitable for display only. |
| formatValueOptions | FormatValueOptions | Additional formatting options. |
UnitFormatUtils.Format(Units, UnitType, Double, Boolean, Boolean)
No longer obsolete in 2020 (was obsolete in 2021)
| units | Units | The units formatting settings, typically obtained from <a href="/2020/9ed56178-e9ae-b4bc-1c0e-e6a867ae3557">Document.GetUnits()</a>. |
| unitType | UnitType | The unit type of the value to format. |
| value | Double | The value to format, in Revit's internal units. |
| maxAccuracy | Boolean | True if the value should be rounded to an increased accuracy level appropriate for editing or understanding the precise value stored in the model. False if the accuracy specified by the FormatOptions should be used, appropriate for printed drawings. |
| forEditing | Boolean | True if the formatting should be modified as necessary so that the formatted string can be successfully parsed, for example by suppressing digit grouping. False if unmodified settings should be used, suitable for display only. |
UnitFormatUtils.TryParse(Units, UnitType, String, ValueParsingOptions, Double%, String%)
No longer obsolete in 2020 (was obsolete in 2021)
| units | Units | The units formatting settings, typically obtained from <a href="/2020/9ed56178-e9ae-b4bc-1c0e-e6a867ae3557">Document.GetUnits()</a>. |
| unitType | UnitType | The target unit type for the value. |
| stringToParse | String | The string to parse. |
| valueParsingOptions | ValueParsingOptions | Additional parsing options. |
| value | Double% | The parsed value, in Revit's internal units. Ignore this value if the function returns false. |
| message | String% | A localized message that, if the parsing fails, explains the reason for failure. |
| → returns | Boolean | True if the string can be parsed, false otherwise. |
UnitFormatUtils.TryParse(Units, UnitType, String, Double%)
No longer obsolete in 2020 (was obsolete in 2021)
| units | Units | The units formatting settings, typically obtained from <a href="/2020/9ed56178-e9ae-b4bc-1c0e-e6a867ae3557">Document.GetUnits()</a>. |
| unitType | UnitType | The target unit type for the value. |
| stringToParse | String | The string to parse. |
| value | Double% | The parsed value, in Revit's internal units. Ignore this value if the function returns false. |
| → returns | Boolean | True if the string can be parsed, false otherwise. |
UnitFormatUtils.TryParse(Units, UnitType, String, ValueParsingOptions, Double%)
No longer obsolete in 2020 (was obsolete in 2021)
| units | Units | The units formatting settings, typically obtained from <a href="/2020/9ed56178-e9ae-b4bc-1c0e-e6a867ae3557">Document.GetUnits()</a>. |
| unitType | UnitType | The target unit type for the value. |
| stringToParse | String | The string to parse. |
| valueParsingOptions | ValueParsingOptions | Additional parsing options. |
| value | Double% | The parsed value, in Revit's internal units. Ignore this value if the function returns false. |
| → returns | Boolean | True if the string can be parsed, false otherwise. |
UnitFormatUtils.TryParse(Units, UnitType, String, Double%, String%)
No longer obsolete in 2020 (was obsolete in 2021)
| units | Units | The units formatting settings, typically obtained from <a href="/2020/9ed56178-e9ae-b4bc-1c0e-e6a867ae3557">Document.GetUnits()</a>. |
| unitType | UnitType | The target unit type for the value. |
| stringToParse | String | The string to parse. |
| value | Double% | The parsed value, in Revit's internal units. Ignore this value if the function returns false. |
| message | String% | A localized message that, if the parsing fails, explains the reason for failure. |
| → returns | Boolean | True if the string can be parsed, false otherwise. |