IsCommandEnabled Method


IExternal Data Manager Server Is Command Enabled Method

Checks if the command is enabled.

Namespace: Autodesk.Revit.UI
Assembly: RevitAPIUI (in RevitAPIUI.dll) Version: 27.0.4.0 (27.0.4.0)
Syntax
bool IsCommandEnabled(
	Document document,
	ExternalDataManagerCommandId commandId,
	IList<ExternalDataManagerDataItemId> dataIds
)

Parameters

document Document
The document.
commandId ExternalDataManagerCommandId
The command name.
dataIds IList ExternalDataManagerDataItemId
The selected data ids.

Return Value

Boolean
Whether the command is enabled or not.
Remarks
Revit calls this whenever the selection changes to grey-out commands that are not currently applicable. The method should be FAST; avoid any heavy processing or disk I/O.
See Also
ArchiLabs

Stop fighting Revit automation.

Build repeatable BIM design and documentation workflows with scripts, data, and AI in one place, without wrestling brittle one-off automations.

Try ArchiLabs →