> For the complete documentation index, see [llms.txt](https://wiki.mksdtech.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://wiki.mksdtech.com/beam/beam-for-revit/ray/layer-mapping.md).

# Layer Mapping

Customise the Rhino® layers RAY creates

RAY puts each exported Revit element on a Rhino layer. By default the layer path is:

```
Project::Category::Subcategory
```

For example `Tower_A::Walls::Common Edges`. The project name is the Revit file name.

To use your own layer structure, create a mapping file.

## Where to put the file

Save a plain text file here:

```
C:\ProgramData\Beam\Mapping.txt
```

RAY reads it on every export. Delete the file to go back to the default structure.

## File format

* Lines that start with `#` are comments. Blank lines are ignored.
* The **first** other line is the layer pattern.
* Every line after it renames a category.

### The pattern line

The pattern is a list of layer levels separated by `::`. Each level can mix plain text and any number of keywords in braces.

| Keyword           | Replaced with                                                                     |
| ----------------- | --------------------------------------------------------------------------------- |
| `{Project}`       | The Revit project name                                                            |
| `{Category}`      | The element's category, for example `Walls`. Renamed by the category lines below. |
| `{Subcategory}`   | The subcategory of the geometry                                                   |
| `{Family}`        | The family name                                                                   |
| `{Type}`          | The type name                                                                     |
| `{FamilyAndType}` | The family and type, as `Family - Type`                                           |

For example:

```
Revit_{Project}::{Category}::{FamilyAndType}::{Subcategory}
```

gives layers like `Revit_Tower_A::Walls::Basic Wall - Exterior 300::Common Edges`.

A level can combine keywords, for example `{Family}_Type_{Type}` gives `Basic Wall_Type_Exterior 300`.

Levels that come out empty are left out. For example, if an element has no subcategory, its objects go on the level above.

### Category lines

Each line after the pattern has the form `RevitCategory=LayerName`:

```
Walls=MKS_WALL
```

This changes how `{Category}` is printed. Categories without a line keep their Revit name.

Lines without `=` are ignored. If a category appears twice, the last line wins.

## Example

```
# Pattern: the first line that is not a comment
Revit_{Project}::{Category}::{FamilyAndType}

# Category renames
Casework=MKS_CASEWORK
Ceilings=MKS_CEILING
Columns=MKS_COLUMN
Curtain Panels=MKS_CURPANEL
Doors=MKS_DOOR
Entourage=MKS_ENTOURAGE
Floors=MKS_FLOOR
Furniture=MKS_FURNITURE
Generic Models=MKS_GENMODEL
Lighting Fixtures=MKS_LIGHTINGFIX
Mass=MKS_MASS
Mechanical Equipment=MKS_MECHANICALEQU
Mullions=MKS_MULLION
Parking=MKS_PARKING
Planting=MKS_PLANTING
Plumbing Fixtures=MKS_PLUMBINGFIX
Railings=MKS_RAILING
Ramps=MKS_RAMPS
Roofs=MKS_ROOF
Specialty Equipment=MKS_SPECIALITYEQU
Stairs=MKS_STAIR
Structural Framing=MKS_STRFRAMING
Topography=MKS_TOPOGRAPHY
Walls=MKS_WALL
Windows=MKS_WINDOW
```

## Special cases

* **Grids and curves** and **Adaptive Components** only use the `{Project}` and `{Category}` levels of the pattern.
* **Edges** go on the current layer.
* **Rooms** from [Batch Export](/beam/beam-for-revit/ray/batch-export.md) use the category `Rooms`.
* In [Batch Export](/beam/beam-for-revit/ray/batch-export.md) with **Include Design Options as Rhino Layers**, elements in a primary design option go under `Project::Design Option::<Option Set>::<Option>`, followed by the rest of the pattern.
