Sets the graphic overrides of a RevitLinkType or RevitLinkInstance in the view.
Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 24.0.0.0 (24.0.0.0)
Since: 2024
Syntax
C# |
---|
|
Visual Basic |
---|
|
Visual C++ |
---|
|
Parameters
- linkId
- Type: Autodesk.Revit.DBElementId
The id of the RevitLinkType or RevitLinkInstance.
- linkDisplaySettings
- Type: Autodesk.Revit.DBRevitLinkGraphicsSettings
Settings representing all link graphic overrides in the view.
Examples

public static void UpdateOverridesInView(View view, ElementId linkElementId, ElementId linkedViewId)
{
RevitLinkGraphicsSettings settings = new RevitLinkGraphicsSettings();
settings.LinkVisibilityType = LinkVisibility.ByLinkView;
settings.LinkedViewId = linkedViewId;
using(Transaction transaction = new Transaction(view.Document, "Set link graphical overrides"))
{
transaction.Start();
view.SetLinkOverrides(linkElementId, settings);
transaction.Commit();
}
}
Exceptions
Exception | Condition |
---|---|
Autodesk.Revit.ExceptionsArgumentException | The input id is not a valid RevitLinkInstance or RevitLinkType id. -or- Setting link overrides to type LinkVisibility.Custom is not supported via the API. -or- The LinkedViewId of linkDisplaySettings has incorrect value for the specified LinkVisibilityType. |
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. |