UnitFormatUtilsTryParse(Units, ForgeTypeId, String, Double) Method |
Parses a formatted string into a number with units if possible.
Namespace: Autodesk.Revit.DBAssembly: RevitAPI (in RevitAPI.dll) Version: 25.0.0.0 (25.0.0.0)
Syntaxpublic static bool TryParse(
Units units,
ForgeTypeId specTypeId,
string stringToParse,
out double value
)
Public Shared Function TryParse (
units As Units,
specTypeId As ForgeTypeId,
stringToParse As String,
<OutAttribute> ByRef value As Double
) As Boolean
public:
static bool TryParse(
Units^ units,
ForgeTypeId^ specTypeId,
String^ stringToParse,
[OutAttribute] double% value
)
static member TryParse :
units : Units *
specTypeId : ForgeTypeId *
stringToParse : string *
value : float byref -> bool
Parameters
- units Units
-
The units formatting settings, typically obtained from Document.GetUnits().
- specTypeId ForgeTypeId
-
Identifier of the target spec for the value.
- stringToParse String
-
The string to parse.
- value Double
-
The parsed value. Ignore this value if the function returns false.
Return Value
Boolean
True if the string can be parsed, false otherwise.
Exceptions
See Also