WorksharingDisplayGraphicSettings Class

Represents the graphical settings that can be assigned to elements in the worksharing display modes.
Inheritance Hierarchy
SystemObject
  Autodesk.Revit.DBWorksharingDisplayGraphicSettings

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 25.0.0.0 (25.0.0.0)
Syntax
public class WorksharingDisplayGraphicSettings : IDisposable

The WorksharingDisplayGraphicSettings type exposes the following members.

Constructors
 NameDescription
Public methodWorksharingDisplayGraphicSettings Creates a new instance.
Top
Properties
 NameDescription
Public propertyFillColor The fill color that will be applied to elements when these settings are applied. Note that this is automatically set by increasing the luma of the specified line color by 65%.
Public propertyIsApplied Indicates whether this set of graphic overrides will be applied.
Public propertyIsValidObject Specifies whether the .NET object represents a valid Revit entity.
Public propertyLineColor The line color that will be applied to elements when these settings are applied.
Top
Methods
 NameDescription
Public methodDisposeReleases all resources used by the WorksharingDisplayGraphicSettings
Public methodEqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
Public methodGetHashCodeServes as the default hash function.
(Inherited from Object)
Public methodGetTypeGets the Type of the current instance.
(Inherited from Object)
Public methodToStringReturns a string that represents the current object.
(Inherited from Object)
Top
Example
public WorksharingDisplayGraphicSettings GetWorksharingDisplaySettings(Document doc, String userName, WorksetId worksetId, bool ownedbyCurrentUser)
{
    WorksharingDisplayGraphicSettings graphicSettings;

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

    // get graphic settings for a user, if specified
    if (!String.IsNullOrEmpty(userName))
        graphicSettings = displaySettings.GetGraphicOverrides(userName);

    // get graphicSettings for a workset, if specified
    else if (worksetId != WorksetId.InvalidWorksetId)
        graphicSettings = displaySettings.GetGraphicOverrides(worksetId);

    // get graphic settings for the OwnedByCurrentUser status
    else if (ownedbyCurrentUser)
        graphicSettings = displaySettings.GetGraphicOverrides(CheckoutStatus.OwnedByCurrentUser);

    // otherwise get graphic settings for the CurrentWithCentral status
    else
        graphicSettings = displaySettings.GetGraphicOverrides(ModelUpdatesStatus.CurrentWithCentral);

    return graphicSettings;
}
See Also