---
title: "setSelectionFilter"
canonical: "https://help.vicon.com/space/Shogun16/13340101/setSelectionFilter"
format: markdown
---
# Description

Toggles the on/off state of selection filters found in the 3D view selection filter drop down.

One of the active views must be a 3D view for this command to work.

## Functional area

Interface

# Command syntax

## Syntax

|  |
| --- |
| `setSelectionFilter "objectName" boolean` |

### Arguments

> Macro (scroll-tablelayout)

| **Name** | **Type** | **Required** | **Comments** |
| --- | --- | --- | --- |
| `objectName` | string | yes | Name of the object or module type whose selection state is to be set. |
| `boolean` | boolean | yes | Boolean to turn on, off, or toggle the selection state of the named object or module. |

### Flags

None

## Return value

void

## Example

```plaintext
//Toggling the Marker selection filter
setSelectionFilter "Marker" toggle;
```

> Macro (scroll-pagebreak)

# Additional information

## Related commands

- [getSelectionFilter](https://vicon-help.atlassian.net/wiki/spaces/Shogun16/pages/13341461)
- [getViewFilter](https://vicon-help.atlassian.net/wiki/spaces/Shogun16/pages/13366271)
- [setViewFilter](https://vicon-help.atlassian.net/wiki/spaces/Shogun16/pages/13366290)