TryParse
Version comparisonPer-version detail
Click a version below to see what changed in that release vs your current frame (2021).
Not present in: 2022, 2023, 2024, 2025, 2025.3, 2026, 2027
2021
current
UnitFormatUtils.TryParse(Units, UnitType, String, Double%)
Became obsolete in 2021: This method is deprecated in Revit 2021 and may be removed in a future version of Revit. Please use the `TryParse(Units, ForgeTypeId, string, out double)` overload instead.
| units | Units | The units formatting settings, typically obtained from <a href="/2021/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. |