GetFilterCommands method

Microsoft Visio Developer Reference

GetFilterCommands method

   Example   

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

Version added

2002

Syntax

retVal = object.GetFilterCommands()

object

Required. An expression that returns an Event object.

retVal

Long. An array of command ranges and a True or False value specifying how to filter events for that command range.

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 defining event filters using command IDs, see the SetFilterCommands method.