Revit 2026 API
ReferenceConvert |
Converts the reference to a stable String representation.
Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 26.0.4.0 (26.0.4.0)
Syntax
public string ConvertToStableRepresentation( Document document )
Public Function ConvertToStableRepresentation ( document As Document ) As String
public: String^ ConvertToStableRepresentation( Document^ document )
member ConvertToStableRepresentation : document : Document -> string
Parameters
- document Document
- The document.
Return Value
String
Exception | Condition |
---|---|
ArgumentNullException | document was . |
InvalidObjectException | Reference contained element ids not found in this document. |

The stable representation can be used to preserve and restore the reference later in the
same Revit session or even in a different session where the same document is present. Use
ParseFromStableRepresentation(Document, String) to restore the reference.
The representation is based on the internal Revit structure and is not intended to be parsed expect by
ParseFromStableRepresentation(Document, String).
See Also