---
title: "setSelectionFilter"
canonical: "https://help.vicon.com/space/ShogunPost121/1253737140/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

> Macro (scroll-tablelayout)

|  |
| --- |
| `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/ShogunPost121/pages/1253737078)
- [getViewFilter](https://vicon-help.atlassian.net/wiki/spaces/ShogunPost121/pages/1253736668)
- [setViewFilter](https://vicon-help.atlassian.net/wiki/spaces/ShogunPost121/pages/1253739217)