using Autodesk.Revit.DB; using Autodesk.Revit.UI; namespace ShrlAlgo.Toolkit.Revit.Helpers; /// /// 已经打开文档 /// public class HasActiveDocument : IExternalCommandAvailability { public bool IsCommandAvailable(UIApplication applicationData, CategorySet selectedCategories) => applicationData.ActiveUIDocument != null; }