TryParse
Version comparisonPer-version detail
Click a version below to see what changed in that release vs your current frame (2020).
Not present in: 2022, 2023, 2024, 2025, 2025.3, 2026, 2027
2020
current
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. |