Skip to content

Entity

Public Class

An object stored in the Extensible Storage framework. An Entity is described by a Schema, which serves both to identify an Entity, and to describe its contents (Fields).

Inheritance Hierarchy

System.Object
Autodesk.Revit.DB.ExtensibleStorage.Entity

Namespace: Autodesk.Revit.DB.ExtensibleStorage

Assembly: RevitAPI (in RevitAPI.dll) Version: 25.0.0.0 (25.0.0.0)

Syntax

public class Entity : IDisposable

The Entity type exposes the following members.

Constructors

Name

Description


Public Method
Entity.

The default-constructed Entity is invalid.


Public Method
Entity(Entity)

Constructs a new copy of the input ESEntity object.


Public Method
Entity(Guid)

Creates a new Entity corresponding to the Schema of the specified GUID.


Public Method
Entity(Schema)

Creates a new Entity corresponding to the Schema.


Properties

Name

Description


Public Property
IsValidObject

Specifies whether the .NET object represents a valid Revit entity.


Public Property

The Schema describing this Entity.


Public Property

The GUID of the Schema describing this Entity.


Methods

Name

Description


Public Method
Clear(Field)

Resets the field to its default value.


Public Method
Clear(String)

Resets the field to its default value.


Public Method

Releases all resources used by the Entity


Public Method

Equals

Determines whether the specified object is equal to the current object.
(Inherited from Object)


Public Method
Get.FieldType.(Field)

Retrieves the value of the field in the entity.


Public Method
Get.FieldType.(String)

Retrieves the value of the field in the entity.


Public Method
Get.FieldType.(Field, ForgeTypeId)

Retrieves the value of the field in the entity.


Public Method
Get.FieldType.(String, ForgeTypeId)

Retrieves the value of the field in the entity.


Public Method

GetHashCode

Serves as the default hash function.
(Inherited from Object)


Public Method

GetType

Gets the Type of the current instance.
(Inherited from Object)


Public Method
IsValid

Checks whether this Entity has a live Schema corresponding to it.


Public Method

Checks whether this Entity may be retrieved by the current add-in.


Public Method

Checks whether a Field belongs to the same Schema as this Entity.


Public Method
Set.FieldType.(Field, FieldType)

Stores the value of the field in the entity.


Public Method
Set.FieldType.(String, FieldType)

Stores the value of the field in the entity.


Public Method
Set.FieldType.(Field, FieldType, ForgeTypeId)

Stores the value of the field in the entity.


Public Method
Set.FieldType.(String, FieldType, ForgeTypeId)

Stores the value of the field in the entity.


Public Method

ToString

Returns a string that represents the current object.
(Inherited from Object)


Public Method

Checks whether this Entity may be stored by the current add-in.


Remarks

An Entity is similar to an object in most object-oriented languages, while a Schema is the class of that object. The Get and Set methods are central - they provide access to the fields of the Entity. Note that an unitialized Entity retrieved from an Element or another Entity (if it has not been created yet) will be represented as an invalid entity, not .. If an Element containing an Entity is split (e.g., a wall split), the Entity and its data will exist in both new Elements. If an Element containing an Entity is copied, the Element copy will also contain a copy of the Entity and its data. If an Entity stores an ElementId, and the Element with that ElementId is deleted, the stored ElementId will automatically be set to ElementId.InvalidElementId (-1).