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: 2025.0.0-alpha00045580+dc02c3918546f1e94eb2d3b13ea99057fb3313e0
Parameters
- distance
- Type: SystemDouble
The distance in the specified units. - unitType
- Type: Tekla.Structures.DatatypeDistanceUnitType
The distance unit type.
| Exception | Condition |
|---|---|
| ArgumentException | Thrown if an invalid unit type is specified. |
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); } }