Share via


Event.GetFilterCommands Method

Visio Automation Reference

Returns an array of command ranges and a True or False value indicating how to filter events for that command range.

Version Information
 Version Added:  Visio 2002

Syntax

expression.GetFilterCommands

expression   A variable that represents an Event object.

Return Value
Long()

Remarks

The event filters described in the array returned by the GetFilterCommands method provide developers a way of ignoring specified events based on command ID. The array returned is that passed to the SetFilterCommands method for this Event object.

The array that is returned by the GetFilterCommands method can be interpreted in the following manner:

The number of elements in the array is a multiple of 3, as follows:

  • The first element contains the beginning command ID of the range (any member of VisUICmds).
  • The second element contains the end command ID of the range (any member of VisUICmds ).
  • The third element contains a True or False value, which indicates whether you are listening to events for that command range (True to listen to events; False to exclude events).

For an event to successfully pass through a command filter, it must satisfy the following criteria:

  • It must have a valid command ID.
  • If all filters are True, the event must match at least one filter.
  • If all filters are False, the event must not match any filter.
  • If the filters are a mixture of True and False, the event must match at least one True filter and not match any False filters.

If there are no True ranges defined in the array, events are considered True.

For details about using command IDs to define event filters, see the SetFilterCommands method.

See Also