Reference
A stable reference to a geometric object in a Revit model.
Inheritance Hierarchy
System.Object
Autodesk.Revit.DB.APIObject
Autodesk.Revit.DB.Reference
Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 25.0.0.0 (25.0.0.0)
Syntax
public class Reference : APIObject
The Reference type exposes the following members.
Constructors
Name
Description
Public Method
Reference
Creates a Reference with the supplied element.
Properties
Name
Description
Public Property
ElementId
The element id for this reference.
Public Property
ElementReferenceType
The type of reference.
Public Property
GlobalPoint
The position on which the reference is hit.
Public Property
Code Example
IsReadOnly
Identifies if the object is read-only or modifiable.
(Inherited from APIObject)
Public Property
LinkedElementId
The id of the top-level element in the linked document that is referred to by this reference.
Public Property
UVPoint
The UV parameters of the reference, if the reference contains a face.
Methods
Name
Description
Public Method
Contains
Checks if given reference identifies part of object identified by this reference.
Public Method
Code Example
ConvertToStableRepresentation
Converts the reference to a stable String representation.
Public Method
CreateLinkReference
Creates a Reference from a Reference in an RVT Link.
Public Method
CreateReferenceInLink
Creates a Reference in an RVT Link from a Reference in the RVT host file.
Public Method
Dispose
Causes the object to release immediately any resources it may be utilizing.
(Inherited from APIObject)
Public Method
Equals
Determines whether the specified object is equal to the current object.
(Inherited from Object)
Public Method
EqualTo
Checks if given reference is equal to this reference.
Public Method
GetHashCode
Serves as the default hash function.
(Inherited from Object)
Public Method
GetType
Gets the Type of the current instance.
(Inherited from Object)
Public Method
Static Member
Code Example
ParseFromStableRepresentation
Converts a stable String representation of a reference to a Reference object.
Public Method
ToString
Returns a string that represents the current object.
(Inherited from Object)