RVTDocs.com
Namespace: Autodesk.Revit.DB Class: View

View.RemoveLinkOverrides

Method
Description:
Deletes the graphical link overrides in the current view.
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.
Syntax
public void RemoveLinkOverrides(
	ElementId linkId
)
Examples
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();
    }
}
Parameters
Parameter Type Description
linkId ElementId The id of the <a href="2204a5ab-6476-df41-116d-23dbe3cb5407.htm">RevitLinkType</a> or <a href="a3a27c39-75bf-67d1-ae78-4cadd49a9c8e.htm">RevitLinkInstance</a>.
Return Value
Exceptions
Exception Condition
ArgumentException The input id is not a valid RevitLinkInstance or RevitLinkType id.
ArgumentNullException A non-optional argument was null
InvalidOperationException The view type does not support Visibility/Graphics Overriddes. -or- The view does not support link graphical overrides.