Skip to main content

OpenTD reference 2026 R1

Class Connection

Last update: 09.03.2026

Namespace: OpenTD
Assembly: OpenTD.dll

A connection contains a handle and a marker. The handle uniquely identifies a TD entity while the marker specifies how to connect to the entity, e.g., which side of a surface to connect to.

[DataContract]
public class Connection

Inheritance

object ← Connection

Inherited Members

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

Constructors

Connection(string, int)

public Connection(string _Handle, int _Marker)

Parameters

_Handle string

_Marker int

Connection()

Initializes a new instance of the class.

public Connection()

Connection(string)

Initializes a new instance of the class.

public Connection(string _Handle)

Parameters

_Handle string

AutoCAD handle.

Connection(DbObject)

Initializes a new instance of the class.

public Connection(DbObject x)

Parameters

x DbObject

Gets the AutoCAD handle from this DbObject.

See Also

DbObject

Connection(DbObject, int)

Initializes a new instance of the class.

public Connection(DbObject x, int _Marker)

Parameters

x DbObject

Gets the AutoCAD handle from this DbObject.

_Marker int

The marker specifies how to connect to the entity.

See Also

DbObject

Fields

Empty

public static readonly Connection Empty

Field Value

Connection

Properties

Handle

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

Property Value

string

Marker

[DataMember]
public int Marker { get; set; }

Property Value

int

Methods

GetDomainName()

public string GetDomainName()

Returns

string

IsDomainName()

public bool IsDomainName()

Returns

bool

IsEmpty()

public bool IsEmpty()

Returns

bool

SetDomainName(string)

public void SetDomainName(string domainName)

Parameters

domainName string

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 Connection(string)

public static implicit operator Connection(string handle)

Parameters

handle string

Returns

Connection

implicit operator Connection(DbObject)

public static implicit operator Connection(DbObject x)

Parameters

x DbObject

Returns

Connection

implicit operator List<Connection>(Connection)

Implicitly converts a single element into a one-element list.

public static implicit operator List<Connection>(Connection x)

Parameters

x Connection

Returns

List<Connection>

Connect with Ansys