2025-04-24 20:56:44 +08:00
|
|
|
|
using Autodesk.Revit.DB;
|
|
|
|
|
|
using Autodesk.Revit.UI;
|
|
|
|
|
|
|
|
|
|
|
|
namespace ShrlAlgoToolkit.Revit.Assists;
|
2025-04-24 20:56:10 +08:00
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 图纸视图可用
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
internal class EnableInViewSheet : IExternalCommandAvailability
|
|
|
|
|
|
{
|
|
|
|
|
|
public bool IsCommandAvailable(UIApplication applicationData, CategorySet selectedCategories) =>
|
|
|
|
|
|
applicationData.ActiveUIDocument?.Document.ActiveView is ViewSheet && applicationData.ActiveUIDocument?.Document.IsFamilyDocument == false;
|
|
|
|
|
|
}
|