View.SetLinkOverrides
Description:
Sets the graphic overrides of a or in the view.
Sets the graphic overrides of a or in the view.
public void SetLinkOverrides(
ElementId linkId,
RevitLinkGraphicsSettings linkDisplaySettings
)
-
linkIdThe id of the RevitLinkType or RevitLinkInstance.
-
linkDisplaySettingsSettings representing all link graphic overrides in the view.
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();
}
}
-
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.
-
A non-optional argument was null
-
The view type does not support Visibility/Graphics Overriddes. -or- The view does not support link graphical overrides.