Namespace:
Autodesk.Revit.DB
WorksharingDisplayGraphicSettings
Class
Description:
Represents the graphical settings that can be assigned to elements in the worksharing display modes.
Represents the graphical settings that can be assigned to elements in the worksharing display modes.
Inheritance Hierarchy:
System.Object
Autodesk.Revit.DB.WorksharingDisplayGraphicSettings
System.Object
Autodesk.Revit.DB.WorksharingDisplayGraphicSettings
Syntax
public class WorksharingDisplayGraphicSettings : IDisposable
Examples
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;
}