Class ModelObject
- Namespace
- TdbIO
- Assembly
- TdbIO.dll
Base class for all entities in a Tekla Structures model.
public class ModelObjectInheritance
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
idintguidGuidtypeintsubtypeintphaseintparentIdint?assemblyIdint?stringAttributesIReadOnlyDictionary<string, string>?numericAttributesIReadOnlyDictionary<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
Id
The unique integer identifier of the object (primary key in the database).
public int Id { get; }Property Value
IfcGuid
The 22-character buildingSMART IFC GlobalId corresponding to TdbIO.ModelObject.Guid, or derived from TdbIO.ModelObject.Id.
public string IfcGuid { get; }Property Value
NumericAttributes
User-defined and system numeric attributes associated with this object.
public IReadOnlyDictionary<string, double> NumericAttributes { get; }Property Value
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
StringAttributes
User-defined and system string attributes associated with this object.
public IReadOnlyDictionary<string, string> StringAttributes { get; }Property Value
Subtype
The object subtype code.
public int Subtype { get; }Property Value
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
Methods
GetNumericAttribute(string)
Gets a numeric attribute value by name, or null if not set.
public double? GetNumericAttribute(string name)Parameters
namestring
Returns
GetStringAttribute(string)
Gets a string attribute value by name, or null if not set.
public string? GetStringAttribute(string name)Parameters
namestring
Returns
ToString()
Returns a string that represents the current object.
public override string ToString()Returns
- string
-
A string that represents the current object.