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
P:Tekla.Structures.Datatype.Distance.CurrentUnitType

DistanceCurrentUnitType Property

Gets or sets the current unit type.

Namespace:  Tekla.Structures.Datatype
Assembly:  Tekla.Structures.Datatype (in Tekla.Structures.Datatype.dll) Version: 2020.0.0.0 (2020.0.55582.0)
Syntax
public static DistanceUnitType CurrentUnitType { get; set; }

Property Value

Type: DistanceUnitType
The current unit type.
Examples
This example shows how to specify the current unit type.
using Tekla.Structures.Datatype;
using System.Globalization;

public class Example
{
       public void Example1()
       {
           // Current unit type controls the default unit type used in parsing.
           Distance.CurrentUnitType = Distance.UnitType.Millimeter;
           Distance distance = Distance.Parse("30.2", CultureInfo.InvariantCulture);
       }
}
See Also