RVTDocs.com

WorksharingDisplaySettings.SetGraphicOverrides(CheckoutStatus, WorksharingDisplayGraphicSettings)

Method
Description:
Sets the graphic overrides assigned to elements with a particular ownership status.
Syntax
Examples
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);
}
Parameters
Parameter Type Description
status CheckoutStatus The ownership status of interest.
overrides WorksharingDisplayGraphicSettings The desired graphic overrides for this ownership status.
Return Value
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