IExternalCommandAvailabilityIsCommandAvailable Method |
Implement this method to provide control over whether your external command is enabled or disabled.
Namespace: Autodesk.Revit.UIAssembly: RevitAPIUI (in RevitAPIUI.dll) Version: 25.0.0.0 (25.0.0.0)
Syntaxbool IsCommandAvailable(
UIApplication applicationData,
CategorySet selectedCategories
)
Function IsCommandAvailable (
applicationData As UIApplication,
selectedCategories As CategorySet
) As Boolean
bool IsCommandAvailable(
UIApplication^ applicationData,
CategorySet^ selectedCategories
)
abstract IsCommandAvailable :
applicationData : UIApplication *
selectedCategories : CategorySet -> bool
Parameters
- applicationData UIApplication
- An ApplicationServices.Application object which contains reference to Application
needed by external command.
- selectedCategories CategorySet
- An list of categories of the elements which have been selected in Revit in the active document,
or an empty set if no elements are selected or there is no active document.
Return Value
Boolean Indicates whether Revit should enable or disable the corresponding external command.
Remarks
This callback will be called by Revit's user interface any time there is a contextual change. Therefore, the callback
must be fast and is not permitted to modify the active document and be blocking in any way.
See Also