Table of Contents

Class ModelObject

Namespace
TdbIO
Assembly
TdbIO.dll

Base class for all entities in a Tekla Structures model.

public class ModelObject

Inheritance

Derived

Inherited Members

Constructors

ModelObject(int, Guid, int, int, int, int?, int?, IReadOnlyDictionary<string, string>?, IReadOnlyDictionary<string, double>?)

Initializes a new instance of TdbIO.ModelObject.

public ModelObject(int id, Guid guid, int type, int subtype, int phase, int? parentId, int? assemblyId, IReadOnlyDictionary<string, string>? stringAttributes = null, IReadOnlyDictionary<string, double>? numericAttributes = null)

Parameters

id int
guid Guid
type int
subtype int
phase int
parentId int?
assemblyId int?
stringAttributes IReadOnlyDictionary<string, string>?
numericAttributes IReadOnlyDictionary<string, double>?

Properties

AssemblyId

The identifier of the assembly this object belongs to, or null if none.

public int? AssemblyId { get; }

Property Value

int?

Guid

The unique RFC 4122 GUID of the object.

public Guid Guid { get; }

Property Value

Guid

Id

The unique integer identifier of the object (primary key in the database).

public int Id { get; }

Property Value

int

IfcGuid

The 22-character buildingSMART IFC GlobalId corresponding to TdbIO.ModelObject.Guid, or derived from TdbIO.ModelObject.Id.

public string IfcGuid { get; }

Property Value

string

NumericAttributes

User-defined and system numeric attributes associated with this object.

public IReadOnlyDictionary<string, double> NumericAttributes { get; }

Property Value

IReadOnlyDictionary<string, double>

ParentId

The parent object identifier, or null if none.

public int? ParentId { get; }

Property Value

int?

Phase

The project phase number this object belongs to.

public int Phase { get; }

Property Value

int

StringAttributes

User-defined and system string attributes associated with this object.

public IReadOnlyDictionary<string, string> StringAttributes { get; }

Property Value

IReadOnlyDictionary<string, string>

Subtype

The object subtype code.

public int Subtype { get; }

Property Value

int

Type

The object type code (e.g. 1 for part, 2 for assembly, 3 for connection, 9 for bolt, 13 for weld).

public int Type { get; }

Property Value

int

Methods

GetNumericAttribute(string)

Gets a numeric attribute value by name, or null if not set.

public double? GetNumericAttribute(string name)

Parameters

name string

Returns

double?

GetStringAttribute(string)

Gets a string attribute value by name, or null if not set.

public string? GetStringAttribute(string name)

Parameters

name string

Returns

string?

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

A string that represents the current object.