GeometryObject.Id Property

GeometryObjectId Property

A unique integer identifying the GeometryObject in its associated non view-specific GeometryElement.

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 25.3.0.0 (25.3.0.0)
Syntax
public int Id { get; }
Public ReadOnly Property Id As Integer
	Get
public:
property int Id {
	int get ();
}
member Id : int with get

Property Value

Int32
Remarks
This id can be stored and used for future referencing. The reference should be stable between minor geometric changes and modifications, but may not remain valid if there are major changes to the element or its surroundings. Note that the id may be negative(and thus invalid for referencing) if obtained from view - specific geometry, or if obtained from most GeometryObjects created in memory by the API. Negative ids cannot be used for referencing. These integer ids should not be used for comparison purposes(other than to check if they are equivalent or not). Nothing should be assumed about rules about how an element populates the sequence of different numeric values as this may change based on the element's definition.
See Also