ObjectId Structure

This class implements memory-resident ObjectId objects for database objects.
Inheritance Hierarchy
SystemObject
  SystemValueType
    Teigha.DatabaseServicesObjectId

Namespace: Teigha.DatabaseServices
Assembly: TD_Mgd (in TD_Mgd.dll) Version: 24.2.0.0
Syntax
public struct ObjectId

The ObjectId type exposes the following members.

Constructors
  Name Description
Public method ObjectId Constructs an object ID based on an old integer pointer.
Top
Properties
  Name Description
Public property Database Property that represents a database that stores an object associated with this identifier.
Public property Handle Property that represents the database handle of the object referenced by this ObjectId object.
Public property IsEffectivelyErased Property that indicates whether the object associated with this ObjectId object is erased, or any of its ownership hierarchy is erased.
Public property IsErased Property that indicates whether the object associated with this identifier is erased.
Public property IsNull Property that indicates whether the identifier is Null.
Public property IsResident Property that indicates whether the object associated with this objectId is resident in memory.
Public property IsValid Property that indicates whether the object ID is associated with a database that is available. If the Object ID belongs to a database that is no longer available (in other words, is deleted), the value is false.
Public property NonForwardedHandle Property that represents the database handle of the object referenced by this ObjectId object.
Public propertyStatic member Null Property that represents the Null identifier.
Public property ObjectClass Property that represents the RXClass of the object that is associated with the object ID. With this property the result can be safely de-referenced and correctly compared against any class derived from DBObject.
Public property ObjectLeftOnDisk For internal use only.
Public property OldId Obsolete.
Property that represents the identifier's value as a long, which is the old format.
Public property OldIdPtr Property that represents the identifier's value as a long, which is the old format.
Public property OriginalDatabase If this object ID is in an externally referenced database and the object associated with this object ID has been redirected to the host database, this property returns a pointer to the externall referenced database.
Top
Methods
  Name Description
Public method Compare Compares the input identifier with this identifier to check whether they are equal.
Public method ConvertToRedirectedId Returns the actual ObjectId object for a database if this ObjectId object has been redirected from another database (for example, an external reference).
Public method Equals Checks objects for equality.
(Overrides ValueTypeEquals(Object))
Public method GetHashCode Retrieves the object hash code.
(Overrides ValueTypeGetHashCode)
Public method GetObject(OpenMode) Returns the object associated with this ID.
Public method GetObject(OpenMode, Boolean) Returns the object associated with this ID.
Public method GetObject(OpenMode, Boolean, Boolean) Returns the object associated with this ID.
Public method GetType Gets the Type of the current instance.
(Inherited from Object)
Public method Open(OpenMode) Obsolete.
Returns the object associated with this ID.
Public method Open(OpenMode, Boolean) Obsolete.
Returns the object associated with this ID.
Public method Open(OpenMode, Boolean, Boolean) Obsolete.
Returns the object associated with this ID.
Public method ToString Returns an equivalent string representation of this object.
(Overrides ValueTypeToString)
Public method ToString(IFormatProvider) Returns an equivalent string representation of this object.
Top
Operators
  Name Description
Public operatorStatic member Equality(ObjectId, ObjectId) Equality operator for the ObjectId class.
Public operatorStatic member GreaterThan(ObjectId, ObjectId) The 'greater than' operator for the ObjectId class.
Public operatorStatic member Inequality(ObjectId, ObjectId) Inequality operator for the ObjectId class.
Public operatorStatic member LessThan(ObjectId, ObjectId) The 'less than' operator for the ObjectId class.
Top
Remarks
Database objects reference other database objects using ObjectId objects. You must explicitly open an object before reading or writing to it, and you should release it when the operation is completed. This functionality provides the support for partial loading of a database, where ObjectId objects exist for all objects in the database, but the actual database objects need not be loaded until they are accessed. It also allows database objects that are not in use to be swapped out of memory, and loaded back in when they are accessed. ObjectId objects are not written out to a DWG/DXF file. If a reference must be preserved to a database object that has been serialized, the object's database handle should be used.
See Also

©  Bricsys NV. All rights reserved.