Revit 2026 API
Datum |
Adds a default Leader for the indicated end of the datum plane. This method does not apply to Reference planes (which do not support leaders).
Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 26.0.4.0 (26.0.4.0)
Syntax
public Leader AddLeader( DatumEnds datumEnd, View view )
Public Function AddLeader ( datumEnd As DatumEnds, view As View ) As Leader
public: Leader^ AddLeader( DatumEnds datumEnd, View^ view )
member AddLeader : datumEnd : DatumEnds * view : View -> Leader
Parameters
Return Value
LeaderThe Leader of the datum plane. Null will return if the view is null.

Exception | Condition |
---|---|
ArgumentException | The datum plane cannot be visible in the view. -or- The bubble is not visible at the datumEnd of the datum plane. |
ArgumentNullException | A non-optional argument was null |
ArgumentOutOfRangeException | A value passed for an enumeration argument is not a member of that enumeration |
InvalidOperationException | This datum plane has no leaders. -or- The DatumPlane already has a leader applied. |

The leader can be added only to ends where the bubble is set to be shown and does not have a leader applied.
See Also