SetGraphicOverrides Method (CheckoutStatus, WorksharingDisplayGraphicSettings)


Worksharing Display Settings Set Graphic Overrides(Checkout Status, Worksharing Display Graphic Settings) Method

Sets the graphic overrides assigned to elements with a particular ownership status.

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 27.0.4.0 (27.0.4.0)
Syntax
public void SetGraphicOverrides(
	CheckoutStatus status,
	WorksharingDisplayGraphicSettings overrides
)

Parameters

status CheckoutStatus
The ownership status of interest.
overrides WorksharingDisplayGraphicSettings
The desired graphic overrides for this ownership status.
Exceptions
Exception Condition
ArgumentNullException A non-optional argument was null
ArgumentOutOfRangeException A value passed for an enumeration argument is not a member of that enumeration
Example
C#
public void SetWorksharingDisplaySettings(Document doc, WorksetId worksetId, String userName)
{
    String message = String.Empty;

    // get or create a WorksharingDisplaySettings current active document
    WorksharingDisplaySettings displaySettings = WorksharingDisplaySettings.GetOrCreateWorksharingDisplaySettings(doc);

    // set a new graphicSettings for CheckoutStatus - NotOwned
    WorksharingDisplayGraphicSettings graphicSettings = new WorksharingDisplayGraphicSettings(true, new Color(255, 0, 0));
    displaySettings.SetGraphicOverrides(CheckoutStatus.NotOwned, graphicSettings);

    // set a new graphicSettings for ModelUpdatesStatus - CurrentWithCentral
    graphicSettings = new WorksharingDisplayGraphicSettings(true, new Color(128, 128, 0));
    displaySettings.SetGraphicOverrides(ModelUpdatesStatus.CurrentWithCentral, graphicSettings);

    // set a new graphicSettings by a given userName
    graphicSettings = new WorksharingDisplayGraphicSettings(true, new Color(0, 255, 0));
    displaySettings.SetGraphicOverrides(userName, graphicSettings);

    // set a new graphicSettings by a given workset Id
    graphicSettings = new WorksharingDisplayGraphicSettings(true, new Color(0, 0, 255));
    displaySettings.SetGraphicOverrides(worksetId, graphicSettings);
}
See Also
ArchiLabs Desktop

Put AI to work inside Revit.

Give Desktop your instructions and project files to build Revit families, update model elements, and create views and schedules. Works directly in Revit and AutoCAD.

Explore Desktop →