RemoveLinkOverrides Method


Deletes the graphical link overrides in the current view.

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 24.0.0.0 (24.0.0.0)
Since:  2024

Syntax

C#
public void RemoveLinkOverrides(
	ElementId linkId
)
Visual Basic
Public Sub RemoveLinkOverrides ( _
	linkId As ElementId _
)
Visual C++
public:
void RemoveLinkOverrides(
	ElementId^ linkId
)

Parameters

linkId
Type: Autodesk.Revit.DBElementId
The id of the RevitLinkType or RevitLinkInstance.

Remarks

If the input linkId references RevitLinkType, then the link overrides will be set to default. If the input linkId references RevitLinkInstance, then the link overrides will be removed and the settings of RevitLinkType will be used for this instance.

Examples

CopyC#
public static void RemoveLinkOverridesInView(View view, ElementId linkId)
{
    using (Transaction transaction = new Transaction(view.Document, "Remove link overrides"))
    {
        transaction.Start();
        view.RemoveLinkOverrides(linkId);
        transaction.Commit();
    }
}

Exceptions

ExceptionCondition
Autodesk.Revit.ExceptionsArgumentException The input id is not a valid RevitLinkInstance or RevitLinkType id.
Autodesk.Revit.ExceptionsArgumentNullException A non-optional argument was null
Autodesk.Revit.ExceptionsInvalidOperationException The view type does not support Visibility/Graphics Overriddes. -or- The view does not support link graphical overrides.

See Also