2027 Class
Changes 7
C

ElementId

Description:
The ElementId object is used as a unique identification for an element within a single project.
Remarks:
The Value within the ElementId is only unique with a single project. It is not unique across several projects. The Id can be used to retrieve a specific element from the database when needed. However ids are subject to change during an Autodesk Revit session and as such should not be retained and used across repeated calls to external commands. If a manner is needed to uniquely identify an element beyond this limitation then a shared parameter should be added to the element containing a unique identifier managed by the external application.
Inheritance Hierarchy:
System.Object
  Autodesk.Revit.DB.ElementId
public class ElementId : IComparable
Name Return Type Description Inherited From
C ElementId(BuiltInCategory) None Create an ElementId handle with the given BuiltInCategory id.
C ElementId(BuiltInParameter) None Create an ElementId handle with the given BuiltInParameter id.
C ElementId(Int64) None Create an ElementId handle with the given 64-bit integer id.
Name Return Type Description Inherited From
M Compare(ElementId) Int32 Compares two element ids.
M CompareTo(Object) Int32 Compares two element ids. Implementation of System.IComparable interface
M Equals(Object) Boolean Determines whether the specified Object is equal to the current Object . (Overrides Object . Equals(Object) )
M GetHashCode() Int32 Gets the value of the id as hash code (Overrides Object . GetHashCode () )
M GetType None Gets the Type of the current instance. (Inherited from Object ) Object
M Parse(String) ElementId Parse the string representation of the id into a corresponding ElementId.
M ToString() String Gets a String representation of the value of the id. (Overrides Object . ToString () )
M TryParse(String, ElementId%) Boolean Parse the string representation of the id into a corresponding ElementId.
Name Return Type Description Inherited From
O Equality(ElementId, ElementId) Boolean Determines whether these two ElementIds are the same.
O GreaterThan(ElementId, ElementId) Boolean Determines whether one element id is greater than another element id.
O GreaterThanOrEqual(ElementId, ElementId) Boolean Determines whether one element id is not less than another element id.
O Inequality(ElementId, ElementId) Boolean Determines whether these two ElementIds are different.
O LessThan(ElementId, ElementId) Boolean Determines whether this element id is less than another element id.
O LessThanOrEqual(ElementId, ElementId) Boolean Determines whether one element id is not greater than another element id.
Name Return Type Description Inherited From
P InvalidElementId ElementId Get the invalid ElementId whose value is -1.
P Value long Provides the value of the element id as a 64-bit integer.