Skip to main content

OpenTD reference 2026 R1

Class ExpressionData

Last update: 09.03.2026

Namespace: OpenTD
Assembly: OpenTD.dll

Data describing a TD expression.

[DataContract]
public class ExpressionData

Inheritance

object ← ExpressionData

Inherited Members

object.ToString(), object.Equals(object), object.Equals(object, object), object.ReferenceEquals(object, object), object.GetHashCode(), object.GetType(), object.MemberwiseClone()

Constructors

ExpressionData()

Initializes a new instance of the class.

public ExpressionData()

ExpressionData(string)

Initializes a new instance of the class.

public ExpressionData(string expression)

Parameters

expression string

The expression.

ExpressionData(string, UnitsData)

Initializes a new instance of the class.

public ExpressionData(string expression, UnitsData expressionUnits)

Parameters

expression string

The expression.

expressionUnits UnitsData

The expression units.

ExpressionData(ExpressionData)

public ExpressionData(ExpressionData x)

Parameters

x ExpressionData

Properties

Comment

[DataMember]
public string Comment { get; set; }

Property Value

string

DisableWarnings

[DataMember]
public bool DisableWarnings { get; set; }

Property Value

bool

ExpressionInSindaUnits

[DataMember]
public bool ExpressionInSindaUnits { get; set; }

Property Value

bool

OutputToSinda

[DataMember]
public bool OutputToSinda { get; set; }

Property Value

bool

Value

[DataMember]
public string Value { get; set; }

Property Value

string

units

ExpressionDatas contain their own unit system, independent of the dwg units or OpenTD WorkingUnits. This unit system defaults to the WorkingUnits but can be changed.

[DataMember]
public UnitsData units { get; set; }

Property Value

UnitsData

unitsType

[DataMember]
public UnitsData.UnitsType unitsType { get; set; }

Property Value

UnitsData.UnitsType

Methods

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

A string that represents the current object.

Operators

implicit operator string(ExpressionData)

public static implicit operator string(ExpressionData x)

Parameters

x ExpressionData

Returns

string

Connect with Ansys