Element
Base class for most persistent data within a Revit document.
Inheritance Hierarchy
System.Object
Autodesk.Revit.DB.Element
Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 25.0.0.0 (25.0.0.0)
Syntax
public class Element : IDisposable
The Element type exposes the following members.
Properties
Name
Description
Public Property
AssemblyInstanceId
The id of the assembly instance to which the element belongs.
Public Property
Code Example
BoundingBox
Retrieves a box that circumscribes all geometry of the element.
Public Property
Category
Retrieves a Category object that represents the category or sub category in which the element resides.
Public Property
Code Example
CreatedPhaseId
Id of a Phase at which the Element was created.
Public Property
Code Example
DemolishedPhaseId
Id of a Phase at which the Element was demolished.
Public Property
Code Example
DesignOption
Returns the design option to which the element belongs.
Public Property
Document
Returns the Document in which the Element resides.
Public Property
Code Example
Geometry
Retrieves the geometric representation of the element.
Public Property
GroupId
The id of the group to which an element belongs.
Public Property
Code Example
Id
A unique identifier for an Element in an Autodesk Revit project.
Public Property
IsModifiable
Identifies if the element is modifiable.
Public Property
IsTransient
Indicates whether an element is transient or permanent.
Public Property
IsValidObject
Specifies whether the .NET object represents a valid Revit entity.
Public Property
LevelId
The id of the level associated with the element.
Public Property
Code Example
Location
This property is used to find the physical location of an element within a project.
Public Property
Name
A human readable name for the Element.
Public Property
OwnerViewId
The id of the view that owns the element.
Public Property
Code Example
Parameter.BuiltInParameter.
Retrieves a parameter from the element given a parameter id.
Public Property
Parameter.Definition.
Retrieves a parameter from the element based on its definition.
Public Property
Parameter.Guid.
Retrieves a parameter from the element given a GUID for a shared parameter.
Public Property
Code Example
Parameters
Retrieves a set containing all of the parameters that are contained within the element.
Public Property
ParametersMap
Retrieves a map containing all of the parameters that are contained within the element.
Public Property
Pinned
Identifies if the element has been pinned to prevent changes.
Public Property
Code Example
UniqueId
A stable unique identifier for an element within the document.
Public Property
VersionGuid
Get the element version Guid.
Public Property
ViewSpecific
Identifies if the element is owned by a view.
Public Property
WorksetId
Get Id of the Workset which owns the element.
Methods
Name
Description
Public Method
ArePhasesModifiable
Returns true if the properties CreatedPhaseId and DemolishedPhaseId can be modified for this Element.
Public Method
CanBeHidden
Indicates if the element can be hidden in the view.
Public Method
CanBeLocked
Identifies if the element can be locked.
Public Method
CanDeleteSubelement
Checks if given subelement can be removed from the element.
Public Method
CanHaveTypeAssigned.
Identifies if the element can have a type assigned.
Public Method
Static Member
CanHaveTypeAssigned(Document, ICollection.ElementId.)
Checks if all elements in the set can have a type assigned.
Public Method
ChangeTypeId(ElementId)
Changes the type of the element.
Public Method
Static Member
ChangeTypeId(Document, ICollection.ElementId., ElementId)
Changes the type of all elements in the given set.
Public Method
DeleteEntity
Deletes the existing entity created by %schema% in the element
Public Method
DeleteSubelement
Removes a subelement from the element.
Public Method
DeleteSubelements
Removes the subelements from the element.
Public Method
Dispose
Releases all resources used by the Element
Public Method
Equals
Determines whether the specified object is equal to the current object.
(Inherited from Object)
Public Method
EvaluateAllParameterValues
Evaluates all the parameters’ values of the element.
Public Method
EvaluateParameterValues
Evaluate the parameters’ values of the element on the given parameter ID set.
Public Method
Static Member
GetChangeTypeAny
Returns ChangeType associated with any change in an element.
Public Method
Static Member
GetChangeTypeElementAddition
Returns ChangeType associated with element addition
Public Method
Static Member
GetChangeTypeElementDeletion
Returns ChangeType associated with element deletion.
Public Method
Static Member
GetChangeTypeGeometry
Returns ChangeType associated with a change in the geometry of an element
Public Method
Static Member
GetChangeTypeParameter(ElementId)
Returns ChangeType associated with a change in a parameter’s value
Public Method
Static Member
GetChangeTypeParameter(Parameter)
Returns ChangeType associated with a change in a parameter’s value
Public Method
GetDependentElements
Get all elements that, from a logical point of view, are the children of this Element.
Public Method
GetEntity
Returns the existing entity corresponding to the Schema if it has been saved in the Element, or an invalid entity otherwise.
Public Method
GetEntitySchemaGuids
Returns the Schema guids of any Entities stored in this element.
Public Method
GetExternalFileReference
Gets information pertaining to the external file referenced by the element.
Public Method
GetExternalResourceReference
Gets the ExternalResourceReference associated with a specified external resource type.
Public Method
GetExternalResourceReferenceExpanded
Gets the collection of ExternalResourceReference associated with a specified external resource type.
Public Method
GetExternalResourceReferences
Gets the map of the external resource references referenced by the element.
Public Method
GetExternalResourceReferencesExpanded
Gets the expanded map of the external resource references referenced by the element.
Public Method
Code Example
GetGeneratingElementIds
Returns the ids of the element(s) that generated the input geometry object.
Public Method
GetGeometryObjectFromReference
Retrieve one geometric primitive contained in the element given a reference.
Public Method
GetHashCode
Serves as the default hash function.
(Inherited from Object)
Public Method
GetMaterialArea
Gets the area of the material with the given id.
Public Method
GetMaterialIds
Gets the element ids of all materials present in the element.
Public Method
GetMaterialVolume
Gets the volume of the material with the given id.
Public Method
GetMonitoredLinkElementIds
Provides the link instance IDs when the element is monitoring.
Public Method
GetMonitoredLocalElementIds
Provides the local element IDs when the element is monitoring.
Public Method
GetOrderedParameters
Gets the parameters associated to the element in order.
Public Method
GetParameter
Retrieves a parameter from the element given identifier.
Public Method
GetParameterFormatOptions
Returns a FormatOptions override for the element Parameter, or a default FormatOptions if no override exists.
Public Method
GetParameters
Retrieves the parameters from the element via the given name.
Public Method
GetPhaseStatus
Gets the status of a given element in the input phase
Public Method
GetSubelements
Returns the collection of element subelements.
Public Method
GetType
Gets the Type of the current instance.
(Inherited from Object)
Public Method
Code Example
GetTypeId
Returns the identifier of this element’s type.
Public Method
GetValidTypes.
Obtains a set of types that are valid for this element.
Public Method
Static Member
GetValidTypes(Document, ICollection.ElementId.)
Obtains a set of types that are valid for all given elements.
Public Method
HasPhases
Returns true if this Element has the properties CreatedPhaseId and DemolishedPhaseId.
Public Method
IsCreatedPhaseOrderValid
Returns true if createdPhaseId and demolishedPhaseId are in order.
Public Method
IsDemolishedPhaseOrderValid
Returns true if createdPhaseId and demolishedPhaseId are in order.
Public Method
IsExternalFileReference
Determines whether this Element represents an external file.
Public Method
IsHidden
Identifies if the element has been permanently hidden in the view.
Public Method
IsMonitoringLinkElement
Indicate whether an element is monitoring any elements in any linked models.
Public Method
IsMonitoringLocalElement
Indicate whether an element is monitoring other local elements.
Public Method
IsPhaseCreatedValid
Returns true if createdPhaseId is an allowed value for the property CreatedPhaseId in this Element.
Public Method
IsPhaseDemolishedValid
Returns true if demolishedPhaseId is an allowed value for the property DemolishedPhaseId in this Element.
Public Method
IsValidType(ElementId)
Checks if given type is valid for this element.
Public Method
Static Member
IsValidType(Document, ICollection.ElementId., ElementId)
Checks if given type is valid for the set of elements.
Public Method
LookupParameter
Attempts to find a parameter on the element which has the given name.
Public Method
RefersToExternalResourceReference
Determines whether this Element uses external resources associated with a specified external resource type.
Public Method
RefersToExternalResourceReferences
Determines whether this Element uses external resources.
Public Method
SetEntity
Stores the entity in the element. If an Entity described by the same Schema already exists, it is overwritten.
Public Method
ToString
Returns a string that represents the current object.
(Inherited from Object)
Remarks
The data in a Revit document consists primarily of a collection of elements. An element usually corresponds to a single component of a building or drawing, such as a wall, door, or dimension, but it can also be something more abstract, like a wall type or a view. Every element in a document has a unique ID, represented by the ElementId class.
Inheritance Hierarchy
System.Object
Autodesk.Revit.DB.Element
Autodesk.Revit.DB.Analysis.AnalysisDisplayLegend
Autodesk.Revit.DB.Analysis.AnalysisDisplayStyle
Autodesk.Revit.DB.Analysis.BuildingOperatingDaySchedule
Autodesk.Revit.DB.Analysis.BuildingOperatingYearSchedule
Autodesk.Revit.DB.Analysis.ConceptualSurfaceType
Autodesk.Revit.DB.Analysis.EnergyAnalysisConstruction
Autodesk.Revit.DB.Analysis.EnergyAnalysisDetailModel
Autodesk.Revit.DB.Analysis.EnergyAnalysisMaterial
Autodesk.Revit.DB.Analysis.EnergyAnalysisOpening
Autodesk.Revit.DB.Analysis.EnergyAnalysisSpace
Autodesk.Revit.DB.Analysis.EnergyAnalysisSurface
Autodesk.Revit.DB.Analysis.EnergyAnalysisWindowType
Autodesk.Revit.DB.Analysis.EnergyAnalysisZone
Autodesk.Revit.DB.Analysis.EnergyDataSettings
Autodesk.Revit.DB.Analysis.GenericZone
Autodesk.Revit.DB.Analysis.HVACLoadType
Autodesk.Revit.DB.Analysis.MassLevelData
Autodesk.Revit.DB.Analysis.MassSurfaceData
Autodesk.Revit.DB.Analysis.PathOfTravel
Autodesk.Revit.DB.Analysis.RouteAnalysisSettings
Autodesk.Revit.DB.Analysis.SpatialFieldManager
Autodesk.Revit.DB.AppearanceAssetElement
Autodesk.Revit.DB.Architecture.ContinuousRail
Autodesk.Revit.DB.Architecture.MultistoryStairs
Autodesk.Revit.DB.Architecture.Railing
Autodesk.Revit.DB.Architecture.Stairs
Autodesk.Revit.DB.Architecture.StairsLanding
Autodesk.Revit.DB.Architecture.StairsPath
Autodesk.Revit.DB.Architecture.StairsRun
Autodesk.Revit.DB.Architecture.TopographySurface
Autodesk.Revit.DB.AreaScheme
Autodesk.Revit.DB.AreaVolumeSettings
Autodesk.Revit.DB.AssemblyInstance
Autodesk.Revit.DB.BaseArray
Autodesk.Revit.DB.BasePoint
Autodesk.Revit.DB.BeamSystem
Autodesk.Revit.DB.ColorFillLegend
Autodesk.Revit.DB.ColorFillScheme
Autodesk.Revit.DB.CombinableElement
Autodesk.Revit.DB.ComponentRepeater
Autodesk.Revit.DB.ComponentRepeaterSlot
Autodesk.Revit.DB.ConnectorElement
Autodesk.Revit.DB.Control
Autodesk.Revit.DB.CurveElement
Autodesk.Revit.DB.DatumPlane
Autodesk.Revit.DB.DefaultDivideSettings
Autodesk.Revit.DB.DesignOption
Autodesk.Revit.DB.Dimension
Autodesk.Revit.DB.DirectShape
Autodesk.Revit.DB.DisplacementElement
Autodesk.Revit.DB.DisplacementPath
Autodesk.Revit.DB.DividedPath
Autodesk.Revit.DB.DividedSurface
Autodesk.Revit.DB.Electrical.AreaBasedLoadType
Autodesk.Revit.DB.Electrical.CableTrayConduitRunBase
Autodesk.Revit.DB.Electrical.CableTraySettings
Autodesk.Revit.DB.Electrical.CableTraySizes
Autodesk.Revit.DB.Electrical.CircuitNamingScheme
Autodesk.Revit.DB.Electrical.CircuitNamingSchemeSettings
Autodesk.Revit.DB.Electrical.ConduitSettings
Autodesk.Revit.DB.Electrical.ConduitSizeSettings
Autodesk.Revit.DB.Electrical.ElectricalAnalyticalLoadSet
Autodesk.Revit.DB.Electrical.ElectricalAnalyticalNode
Autodesk.Revit.DB.Electrical.ElectricalDemandFactorDefinition
Autodesk.Revit.DB.Electrical.ElectricalLoadClassification
Autodesk.Revit.DB.Electrical.ElectricalSetting
Autodesk.Revit.DB.Electrical.PanelScheduleSheetInstance
Autodesk.Revit.DB.Electrical.PanelScheduleTemplate
Autodesk.Revit.DB.ElementType
Autodesk.Revit.DB.ElevationMarker
Autodesk.Revit.DB.ExportDGNSettings
Autodesk.Revit.DB.ExportDWGSettings
Autodesk.Revit.DB.ExportPDFSettings
Autodesk.Revit.DB.ExtensibleStorage.DataStorage
Autodesk.Revit.DB.FabricationConfiguration
Autodesk.Revit.DB.FabricationPart
Autodesk.Revit.DB.FabricationServiceSettings
Autodesk.Revit.DB.FaceSplitter
Autodesk.Revit.DB.Family
Autodesk.Revit.DB.FilledRegion
Autodesk.Revit.DB.FillPatternElement
Autodesk.Revit.DB.FilterElement
Autodesk.Revit.DB.GraphicsStyle
Autodesk.Revit.DB.Group
Autodesk.Revit.DB.HostObject
Autodesk.Revit.DB.IFCCategoryTemplate
Autodesk.Revit.DB.ImageInstance
Autodesk.Revit.DB.IndependentTag
Autodesk.Revit.DB.Instance
Autodesk.Revit.DB.InternalOrigin
Autodesk.Revit.DB.KeyBasedTreeEntryTable
Autodesk.Revit.DB.LinePatternElement
Autodesk.Revit.DB.Material
Autodesk.Revit.DB.Mechanical.DuctSettings
Autodesk.Revit.DB.Mechanical.DuctSizeSettings
Autodesk.Revit.DB.Mechanical.MechanicalEquipmentSet
Autodesk.Revit.DB.Mechanical.MEPAnalyticalSystem
Autodesk.Revit.DB.Mechanical.MEPHiddenLineSettings
Autodesk.Revit.DB.Mechanical.Zone
Autodesk.Revit.DB.Mechanical.ZoneEquipment
Autodesk.Revit.DB.MEPSystem
Autodesk.Revit.DB.ModelText
Autodesk.Revit.DB.MultipleValuesIndicationSettings
Autodesk.Revit.DB.MultiReferenceAnnotation
Autodesk.Revit.DB.MultiSegmentGrid
Autodesk.Revit.DB.NestedFamilyTypeReference
Autodesk.Revit.DB.NumberingSchema
Autodesk.Revit.DB.NumberSystem
Autodesk.Revit.DB.Opening
Autodesk.Revit.DB.ParameterElement
Autodesk.Revit.DB.Part
Autodesk.Revit.DB.PartMaker
Autodesk.Revit.DB.Phase
Autodesk.Revit.DB.PhaseFilter
Autodesk.Revit.DB.Plumbing.PipeSettings
Autodesk.Revit.DB.PrintSetting
Autodesk.Revit.DB.ProjectInfo
Autodesk.Revit.DB.PropertyLine
Autodesk.Revit.DB.PropertySetElement
Autodesk.Revit.DB.ReferencePoint
Autodesk.Revit.DB.Revision
Autodesk.Revit.DB.RevisionCloud
Autodesk.Revit.DB.RevisionNumberingSequence
Autodesk.Revit.DB.RevisionSettings
Autodesk.Revit.DB.ScheduleSheetInstance
Autodesk.Revit.DB.Segment
Autodesk.Revit.DB.SheetCollection
Autodesk.Revit.DB.SketchBase
Autodesk.Revit.DB.SketchPlane
Autodesk.Revit.DB.SpatialElement
Autodesk.Revit.DB.SpatialElementCalculationLocation
Autodesk.Revit.DB.SpatialElementTag
Autodesk.Revit.DB.SSEPointVisibilitySettings
Autodesk.Revit.DB.StartingViewSettings
Autodesk.Revit.DB.Structure.AnalyticalElement
Autodesk.Revit.DB.Structure.AnalyticalLink
Autodesk.Revit.DB.Structure.AnalyticalToPhysicalAssociationManager
Autodesk.Revit.DB.Structure.AreaReinforcement
Autodesk.Revit.DB.Structure.BoundaryConditions
Autodesk.Revit.DB.Structure.FabricArea
Autodesk.Revit.DB.Structure.FabricSheet
Autodesk.Revit.DB.Structure.Hub
Autodesk.Revit.DB.Structure.LoadBase
Autodesk.Revit.DB.Structure.LoadCase
Autodesk.Revit.DB.Structure.LoadCombination
Autodesk.Revit.DB.Structure.LoadNature
Autodesk.Revit.DB.Structure.LoadUsage
Autodesk.Revit.DB.Structure.PathReinforcement
Autodesk.Revit.DB.Structure.Rebar
Autodesk.Revit.DB.Structure.RebarContainer
Autodesk.Revit.DB.Structure.RebarCoupler
Autodesk.Revit.DB.Structure.RebarInSystem
Autodesk.Revit.DB.Structure.ReinforcementSettings
Autodesk.Revit.DB.Structure.StructuralConnectionHandler
Autodesk.Revit.DB.Structure.StructuralConnectionSettings
Autodesk.Revit.DB.Structure.StructuralSettings
Autodesk.Revit.DB.Structure.Truss
Autodesk.Revit.DB.SunAndShadowSettings
Autodesk.Revit.DB.TextElement
Autodesk.Revit.DB.View
Autodesk.Revit.DB.ViewNavigationToolSettings
Autodesk.Revit.DB.Viewport
Autodesk.Revit.DB.ViewSheetSet
Autodesk.Revit.DB.WorksetDefaultVisibilitySettings
Autodesk.Revit.DB.WorksharingDisplaySettings