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.

Meta.Microsoft.Help.Id
M:Tekla.Structures.Datatype.Distance.#ctor(System.Double,Tekla.Structures.Datatype.Distance.UnitType)

Distance Constructor (Double, DistanceUnitType)

Initializes a new instance of the structure.

Namespace:  Tekla.Structures.Datatype
Assembly:  Tekla.Structures.Datatype (in Tekla.Structures.Datatype.dll) Version: 2020.0.0.0 (2020.0.55582.0)
Syntax
public Distance(
	double distance,
	DistanceUnitType unitType
)

Parameters

distance
Type: SystemDouble
The distance in the specified units.
unitType
Type: Tekla.Structures.DatatypeDistanceUnitType
The distance unit type.
Exceptions
Exception Condition
ArgumentException Thrown if an invalid unit type is specified.
Examples
This example shows how to construct a new Distance instance with a specific unit type.
using Tekla.Structures.Datatype;

public class Example
{
       public void Example1()
       {
           Distance distance = new Distance(2, Distance.UnitType.Inch);
       }
}
See Also