Using the Process Analyst > Process Analyst for Developers > Automation Model > ICommand.Enabled [Property][Get/Set]

ICommand.Enabled [Property][Get/Set]

Gets this commands enabled state.

Defined As

Execution Result

If the property get succeeds, the return value will be Success. If the return value is invalid, the return value will be InvalidArgument.

Limits

Remarks

The setting of this property is only valid for custom commands.

Calling Syntax

This example assumes there is a valid Command object as retrieved from a Process Analyst's CommandSystem. (for example, VBA: ProcessAnalyst.CommandSystem.Item(1))

[VBA]

Sub Example(Command As Object)
Dim enabled As Boolean
`Getting Property value
enabled = Command.Enabled
`Setting Property value
Command.Enabled = True
End Sub

[Cicode]

FUNCTION Example(OBJECT hCommand)
// Getting property value
INT nEnabled = _ObjectGetProperty(hCommand, "Enabled");
// Setting property value
_ObjectSetProperty(hCommand, "Enabled", -1);
END