整理代码
This commit is contained in:
13
ShrlAlgo.Toolkit.Revit/Helpers/EnableInViewPlan.cs
Normal file
13
ShrlAlgo.Toolkit.Revit/Helpers/EnableInViewPlan.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
namespace ShrlAlgo.Toolkit.Revit.Helpers;
|
||||
|
||||
/// <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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user