Entity
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).
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 .a null reference (Nothing in Visual Basic). 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).
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 .a null reference (Nothing in Visual Basic). 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
System.Object
Autodesk.Revit.DB.ExtensibleStorage.Entity
public class Entity : IDisposable
| Name | Return Type | Description |
|---|---|---|
| Entity() | None | The default-constructed Entity is invalid. |
| Entity(Entity) | None | Constructs a new copy of the input ESEntity object. |
| Entity(Guid) | None | Creates a new Entity corresponding to the Schema of the specified GUID. |
| Entity(Schema) | None | Creates a new Entity corresponding to the Schema. |
| Name | Return Type | Description |
|---|---|---|
| Clear(Field) | None | Resets the field to its default value. |
| Clear(String) | None | Resets the field to its default value. |
| Dispose() | None | Releases all resources used by the |
| Get``1(Field) | FieldType | Retrieves the value of the field in the entity. |
| Get``1(Field, ForgeTypeId) | FieldType | Retrieves the value of the field in the entity. |
| Get``1(String) | FieldType | Retrieves the value of the field in the entity. |
| Get``1(String, ForgeTypeId) | FieldType | Retrieves the value of the field in the entity. |
| IsValid() | bool | Checks whether this Entity has a live Schema corresponding to it. |
| ReadAccessGranted() | bool | Checks whether this Entity may be retrieved by the current add-in. |
| RecognizedField(Field) | bool | Checks whether a Field belongs to the same Schema as this Entity. |
| Set``1(Field, FieldType) | Set | Stores the value of the field in the entity. |
| Set``1(Field, FieldType, ForgeTypeId) | Set | Stores the value of the field in the entity. |
| Set``1(String, FieldType) | Set | Stores the value of the field in the entity. |
| Set``1(String, FieldType, ForgeTypeId) | Set | Stores the value of the field in the entity. |
| WriteAccessGranted() | bool | Checks whether this Entity may be stored by the current add-in. |
| Name | Return Type | Description |
|---|---|---|
| IsValidObject | bool | Specifies whether the .NET object represents a valid Revit entity. |
| SchemaGUID | Guid | The GUID of the Schema describing this Entity. |
| Schema | Schema | The Schema describing this Entity. |