Skip to main content

OpenTD reference 2026 R1

Class DataItemIdentifier

Last update: 09.03.2026

Namespace: OpenTD.Results.Dataset
Assembly: OpenTD.Results.dll

Identifies a data subtype (T, TL, PL, etc.) -- with an optional fluid constituent (A, B, W, etc.) -- associated with an "item" (an entity (node, lump, etc.), register, record number, etc.), e.g., MAIN.T6, FLOW.PL100, FLOW.GTA10, MYREGISTER DIMENSIONLESS. Note: the Units member is only applicable to registers. If null, default units will be assumed.

public class DataItemIdentifier

Inheritance

object ← DataItemIdentifier

Inherited Members

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

Constructors

DataItemIdentifier(ItemIdentifier, DataSubtype, UnitsData)

Use this ctor to combine an ItemIdentifier (MAIN.6, MYREGISTER) with a DataSubtype (T, DIMENSIONLESS) to create a DataItemIdentifier (MAIN.T6, MYREGISTER DIMENSIONLESS).

public DataItemIdentifier(ItemIdentifier itemIdentifier, DataSubtype subtype = null, UnitsData units = null)

Parameters

itemIdentifier ItemIdentifier

subtype DataSubtype

units UnitsData

Exceptions

OpenTDException

DataItemIdentifier(string, UnitsData, IDataset)

Constructs a DataItemIdentifier from a string like "MAIN.T6" or "MY_REGISTER2". Registers are assumed dimensionless unless registerUnits parameter is set. Use "MY_UDFA.MAIN.6" to refer to an entity-length UDFA. Use "MY_UDFA.4" to refer to one array in a user-length UDFA. UDFAdataset must be set to correctly determine the characteristics of any UDFA's. (Otherwise the parser doesn't know if MY_UDFA.FLOW.3 is for lumps, paths, etc.)

public DataItemIdentifier(string sindaName, UnitsData registerUnits = null, IDataset UDFAdataset = null)

Parameters

sindaName string

registerUnits UnitsData

UDFAdataset IDataset

DataItemIdentifier(string, UnitsData, IEnumerable<string>, IEnumerable<string>)

Deprecated. Do not use this DataItemIdentifier ctor.

public DataItemIdentifier(string sindaName, UnitsData units, IEnumerable<string> thermalSubs, IEnumerable<string> fluidSubs)

Parameters

sindaName string

units UnitsData

thermalSubs IEnumerable<string>

fluidSubs IEnumerable<string>

Properties

ItemIdentifier

public ItemIdentifier ItemIdentifier { get; }

Property Value

ItemIdentifier

Subtype

public DataSubtype Subtype { get; }

Property Value

DataSubtype

Units

public UnitsData Units { get; }

Property Value

UnitsData

Methods

Equals(object)

Determines whether the specified object is equal to the current object.

public override bool Equals(object obj)

Parameters

obj object

The object to compare with the current object.

Returns

bool

true if the specified object is equal to the current object; otherwise, false.

GetHashCode()

Serves as the default hash function.

public override int GetHashCode()

Returns

int

A hash code for the current object.

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

A string that represents the current object.

Operators

operator ==(DataItemIdentifier, DataItemIdentifier)

public static bool operator ==(DataItemIdentifier x1, DataItemIdentifier x2)

Parameters

x1 DataItemIdentifier

x2 DataItemIdentifier

Returns

bool

operator !=(DataItemIdentifier, DataItemIdentifier)

public static bool operator !=(DataItemIdentifier x1, DataItemIdentifier x2)

Parameters

x1 DataItemIdentifier

x2 DataItemIdentifier

Returns

bool

Connect with Ansys