Autodesk.Revit.DB.Events.DocumentWorksharingEnabledEventArgs
类是Revit API中的一种事件参数类型,用于表示文档协作启用事件的参数。
public class DocumentWorksharingEnabledEventArgs : DocumentChangedEventArgs
System.Object
System.EventArgs
Autodesk.Revit.DB.Events.DocumentChangedEventArgs
Autodesk.Revit.DB.Events.DocumentWorksharingEnabledEventArgs
当在Revit文档中启用协作功能时,将触发DocumentWorksharingEnabled
事件。DocumentWorksharingEnabledEventArgs
包含以下属性:
Document
:触发事件的Revit文档对象。Monitor
:文档协作监视器,可用于监视文档协作状态的变化。以下示例演示如何使用DocumentWorksharingEnabledEventArgs
类:
public void OnDocumentWorksharingEnabled(object sender, DocumentWorksharingEnabledEventArgs e)
{
UIDocument uiDoc = new UIDocument(e.Document);
MonitorStatus status = e.Monitor.GetStatus();
TaskDialog.Show("Worksharing Enabled", "Worksharing has been enabled for the document.");
}