The Autodesk.Revit.DB.ExternalGeometryId
class represents a unique identifier for external geometry objects that are referenced by Revit elements. These external objects can be geometry data from files, databases or other sources such as GIS data.
Guid
: Gets the unique identifier for the external geometry object.TypeId
: Gets the TypeId of the external geometry object.Equals(Object)
: Determines whether the specified object is equal to the current object.GetHashCode()
: Serves as the default hash function.ToString()
: Returns a string that represents the current object.The ExternalGeometryId is used to maintain a link between Revit elements and their associated external geometry objects. For example, an imported CAD file may contain blocks with unique identifiers that can be referenced by Revit elements. The ExternalGeometryId can be used to map the Revit elements to their associated external geometry objects.
ExternalFileReference externalReference = ExternalFileReference.Create(@"C:\path\to\external\file.ifc");
ElementId elementId = new ElementId(12345);
ExternalGeometryId externalGeometryId = new ExternalGeometryId(externalReference, elementId);
// Get the unique id for the external geometry object
Guid externalGuid = externalGeometryId.Guid;