# Revit Selection Filter

> >

- **Type:** Skill
- **Install:** `agentstack add skill-nice3point-revit-skills-revit-selection-filter`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [Nice3point](https://agentstack.voostack.com/s/nice3point)
- **Installs:** 0
- **Category:** [Agent Skills](https://agentstack.voostack.com/c/agent-skills)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [Nice3point](https://github.com/Nice3point)
- **Source:** https://github.com/Nice3point/revit-skills/tree/main/plugins/revit-ui/skills/revit-selection-filter

## Install

```sh
agentstack add skill-nice3point-revit-skills-revit-selection-filter
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# Revit Selection Filter

`Selection.PickObject` takes an `ISelectionFilter` to decide what the user may pick.
`SelectionConfiguration` (from `Nice3point.Revit.Toolkit`) builds that filter from two lambdas; you do not hand-roll a class.
It drives an interactive pick and needs the Revit UI (`RevitAPIUI`).

## When to use

- Restricting an interactive pick to a category, type, or geometry kind.

## Workflow

### Step 1: Configure the allowed elements and references

`Allow.Element` gates which elements are pickable; `Allow.Reference` gates which references (faces, edges, points).
Set either or both — each returns the configuration and they chain — then pass `configuration.Filter` to the pick call.

```csharp
var configuration = new SelectionConfiguration()
    .Allow.Element(element => element.Category.Id.AreEquals(BuiltInCategory.OST_Walls))
    .Allow.Reference((reference, position) => false);

var picked = uiDocument.Selection.PickObject(ObjectType.Element, configuration.Filter);
```

### Step 2: Verify

Run the command and confirm only the intended elements or references highlight and accept a pick.

## Validation

- [ ] The filter uses `SelectionConfiguration`, not a hand-rolled `ISelectionFilter`.
- [ ] `Allow.Element`/`Allow.Reference` express the rule with a lambda, not a new class.

## Common Pitfalls

| Pitfall                                           | Correct approach                                          |
|---------------------------------------------------|-----------------------------------------------------------|
| A bespoke `ISelectionFilter` for a category check | Use `SelectionConfiguration().Allow.Element(...)`.        |
| Filtering references with an element-only filter  | Add `Allow.Reference((reference, position) => ...)`.      |
| `SelectionConfiguration` not found                | The `Nice3point.Revit.Toolkit` package is not referenced. |

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [Nice3point](https://github.com/Nice3point)
- **Source:** [Nice3point/revit-skills](https://github.com/Nice3point/revit-skills)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-nice3point-revit-skills-revit-selection-filter
- Seller: https://agentstack.voostack.com/s/nice3point
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
