15 lines
395 B
C#
15 lines
395 B
C#
|
|
using Autodesk.Revit.DB;
|
|||
|
|
using Autodesk.Revit.UI;
|
|||
|
|
|
|||
|
|
namespace Szmedi.Toolkit.RvAssists
|
|||
|
|
{
|
|||
|
|
public class EnableOnPlan : IExternalCommandAvailability
|
|||
|
|
{
|
|||
|
|
public bool IsCommandAvailable(UIApplication applicationData, CategorySet selectedCategories)
|
|||
|
|
{
|
|||
|
|
var view = applicationData?.ActiveUIDocument?.ActiveView;
|
|||
|
|
return view is ViewPlan;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|