RVTDocs.com

Entity

Class
Description:
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).
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 null. 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).
Inheritance Hierarchy:
System.Object
  Autodesk.Revit.DB.ExtensibleStorage.Entity
Syntax
public class Entity : IDisposable
Entity Class Members:
Name Description Inherited From
Entity() The default-constructed Entity is invalid.
Entity(Entity) Constructs a new copy of the input ESEntity object.
Entity(Guid) Creates a new Entity corresponding to the Schema of the specified GUID.
Entity(Schema) Creates a new Entity corresponding to the Schema.
Name Description Inherited From
IsValidObject Specifies whether the .NET object represents a valid Revit entity.
Schema The Schema describing this Entity.
SchemaGUID The GUID of the Schema describing this Entity.
Name Description Inherited From
Clear(Field) Resets the field to its default value.
Clear(String) Resets the field to its default value.
Dispose Releases all resources used by the Entity
Equals Determines whether the specified object is equal to the current object. (Inherited from Object ) Object
Get<FieldType>(Field) Retrieves the value of the field in the entity.
Get<FieldType>(String) Retrieves the value of the field in the entity.
Get<FieldType>(Field, ForgeTypeId) Retrieves the value of the field in the entity.
Get<FieldType>(String, ForgeTypeId) Retrieves the value of the field in the entity.
GetHashCode Serves as the default hash function. (Inherited from Object ) Object
GetType Gets the Type of the current instance. (Inherited from Object ) Object
IsValid Checks whether this Entity has a live Schema corresponding to it.
ReadAccessGranted Checks whether this Entity may be retrieved by the current add-in.
RecognizedField Checks whether a Field belongs to the same Schema as this Entity.
Set<FieldType>(Field, FieldType) Stores the value of the field in the entity.
Set<FieldType>(String, FieldType) Stores the value of the field in the entity.
Set<FieldType>(Field, FieldType, ForgeTypeId) Stores the value of the field in the entity.
Set<FieldType>(String, FieldType, ForgeTypeId) Stores the value of the field in the entity.
ToString Returns a string that represents the current object. (Inherited from Object ) Object
WriteAccessGranted Checks whether this Entity may be stored by the current add-in.