14 lines
422 B
C#
14 lines
422 B
C#
|
|
using Autodesk.Revit.DB;
|
|||
|
|
using Autodesk.Revit.UI;
|
|||
|
|
|
|||
|
|
namespace Szmedi.Toolkit.RvAssists
|
|||
|
|
{
|
|||
|
|
public class OnActiveProjectDocument : IExternalCommandAvailability
|
|||
|
|
{
|
|||
|
|
public bool IsCommandAvailable(UIApplication applicationData, CategorySet selectedCategories)
|
|||
|
|
{
|
|||
|
|
var doc = applicationData?.ActiveUIDocument?.Document;
|
|||
|
|
return doc != null && !doc.IsFamilyDocument;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|