API Reference

Detailed and full API reference helps you master Tekla development

This is the most recent version of Tekla Open API.
For older versions, please visit Tekla Warehouse.

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: 2023.0.1
Syntax
public static Distance Parse(
	string text
)

Parameters

text
Type: SystemString
The text to parse.

Return Value

Type: Distance
The representation of the specified distance.
Exceptions
ExceptionCondition
FormatExceptionThrown if the text does not represent a distance.
Examples
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");
       }
}
See Also