GetParentId Method


Revit Link Type Get Parent Id Method

Gets the id of this link's immediate parent.

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 25.0.0.0 (25.0.0.0)
Syntax
public ElementId GetParentId()

Return Value

ElementId
The id of the immediate parent of this link, or invalidElementId if this link is a top-level link.
Remarks
This function returns the immediate parent id. Given the link structure A -> B -> C, then calling this function on C will return B's id. Call GetRootId to get A's id.
See Also
ArchiLabs Desktop

Put AI to work inside Revit.

Give Desktop your instructions and project files to build Revit families, update model elements, and create views and schedules. Works directly in Revit and AutoCAD.

Explore Desktop →