# Revit Element And Parameter Access

> >

- **Type:** Skill
- **Install:** `agentstack add skill-nice3point-revit-skills-revit-element-and-parameter-access`
- **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-api/skills/revit-element-and-parameter-access

## Install

```sh
agentstack add skill-nice3point-revit-skills-revit-element-and-parameter-access
```

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

## About

# Revit Element and Parameter Access

The `Nice3point.Revit.Extensions` accessors wrap the raw element and parameter API — `document.GetElement(id) as T`, the three different parameter getters, manual `StorageType` switching, and `UnitUtils` — into one fluent, null-friendly chain.
`FindParameter` also falls back to the element type when the instance lacks the parameter.

## When to use

- Resolving an `ElementId` to a typed element.
- Reading or writing a parameter value, or converting a stored length to display units.

## When not to use

- Selecting a set of elements from the model — use `revit-element-collector`.

## Workflow

### Step 1: Get a typed element from an id

```csharp
var wall = wallId.ToElement(document);
```

Returns null when the element is missing or not that type.

### Step 2: Find a parameter

```csharp
var parameter = wall.FindParameter(BuiltInParameter.WALL_USER_HEIGHT_PARAM);
```

`FindParameter` accepts a `BuiltInParameter`, `ParameterTypeId`, `Guid`, or name, and returns the type's parameter when the instance has none.
It returns null when the parameter is absent — null-check for optional parameters.

### Step 3: Read the typed value

```csharp
double heightFeet = parameter.AsDouble(); // native storage read
bool isStructural = wall.FindParameter(BuiltInParameter.WALL_STRUCTURAL_SIGNIFICANT).AsBool();
Color color = door.FindParameter("Door color").AsColor();
var level = wall.FindParameter(BuiltInParameter.WALL_BASE_CONSTRAINT).AsElement();
```

### Step 4: Convert internal units at the boundary

Revit stores lengths in feet; convert when values leave or enter the model.

```csharp
double heightMm = parameter.AsDouble().ToMillimeters();
```

### Step 5: Write inside a transaction

```csharp
parameter.Set(3.0.FromMeters());
door.FindParameter("Door color").Set(new Color(66, 69, 96));
```

Writes require an open transaction — see `revit-code-style` for ownership.

## Validation

- [ ] `ElementId` is resolved with `ToElement`, not `GetElement(id) as T`.
- [ ] Parameters are found with `FindParameter`, and optional ones are null-checked.
- [ ] Stored lengths are converted at the boundary with `ToMillimeters`/`FromMeters` etc.
- [ ] Writes happen inside a transaction.

## Common Pitfalls

| Pitfall                                                         | Correct approach                                             |
|-----------------------------------------------------------------|--------------------------------------------------------------|
| `document.GetElement(id) as Wall`                               | `id.ToElement(document)`.                              |
| Choosing among `get_Parameter`/`LookupParameter`/`GetParameter` | `FindParameter(...)` handles instance and type.              |
| Using a raw feet value as millimeters                           | Convert with `.ToMillimeters()` / `.FromMeters()`.           |
| `ToElement`/`FindParameter` not found                           | The `Nice3point.Revit.Extensions` 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-element-and-parameter-access
- 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%.
