Revit 2026 API
Revit |
Gets the id of the top-level link which this link is linked into.
Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 26.0.4.0 (26.0.4.0)
Syntax
public ElementId GetRootId()
Public Function GetRootId As ElementId
public: ElementId^ GetRootId()
member GetRootId : unit -> ElementId
Return Value
ElementIdThe id of the top-level link which this link is ultimately linked under, or invalidElementId if this link is a top-level link.
This function will always return the id of a top-level link, or invalidElementId.
Given the link structure A -> B -> C, then calling this function on
C will return A's id. Call GetParentId to get B's id.
See Also