2025-04-24 20:56:44 +08:00
|
|
|
|
using Autodesk.Revit.DB;
|
|
|
|
|
|
using Autodesk.Revit.UI;
|
|
|
|
|
|
|
2026-02-21 16:31:24 +08:00
|
|
|
|
namespace ShrlAlgoToolkit.RevitCore.Assists;
|
2025-04-24 20:56:10 +08:00
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 命令在平面视图可用
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public class EnableInViewPlan : IExternalCommandAvailability
|
|
|
|
|
|
{
|
|
|
|
|
|
public bool IsCommandAvailable(UIApplication applicationData, CategorySet selectedCategories)
|
|
|
|
|
|
{
|
|
|
|
|
|
return applicationData.ActiveUIDocument?.Document.ActiveView is ViewPlan
|
|
|
|
|
|
&& applicationData.ActiveUIDocument?.Document.IsFamilyDocument == false;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|