DistanceParse Method (String) |
Parses a distance from a string representation using the current unit type and culture.
Namespace: Tekla.Structures.Datatype
Assembly: Tekla.Structures.Datatype (in Tekla.Structures.Datatype.dll) Version: 2026.0.0-alpha00057080+93cd22c410a086ecc356b7088d4daaf2e12907eb
Parameters
- text
- Type: SystemString
The text to parse.
Return Value
Type: DistanceThe representation of the specified distance.
| Exception | Condition |
|---|---|
| FormatException | Thrown if the text does not represent a distance. |
This example shows how to parse a Distance instance from a string.
using Tekla.Structures.Datatype; public class Example { public void Example1() { Distance distance = Distance.Parse("3"); } }