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.

[MessagePackObject(true)]
public class ExpressionData

Inheritance

object ← ExpressionData

Inherited Members

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

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

public string Comment { get; set; }

Property Value

string

DisableWarnings

public bool DisableWarnings { get; set; }

Property Value

bool

ExpressionInSindaUnits

public bool ExpressionInSindaUnits { get; set; }

Property Value

bool

OutputToSinda

public bool OutputToSinda { get; set; }

Property Value

bool

Value

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.

public UnitsData units { get; set; }

Property Value

UnitsData

unitsType

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