> 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

When exporting from Revit with **RAY**, Rhino layers are created automatically based on Revit element properties. To customize how elements are organized, you can define your own **layer mapping file**.

## Creating a mapping file

By default, RAY looks for the mapping file at:

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

The mapping file is a plain text (*.txt*) file.&#x20;

The file has two parts:

1. First line: the pattern used to build layer names.
2. Following lines: category conversion pairs that replace `{Category}` with custom text.

### The pattern line

The **first line** of the file defines the **layer naming pattern**.

A pattern can include:

* Free text → literal text that will appear as written
* Keywords → placeholders in `{braces}` replaced with Revit values
* `::` → creates a new Rhino sublayer

#### Supported keywords

* `{Project}` – the Revit project name
* `{Category}` – the Revit category of the element (e.g. Walls, Floors)
* `{Subcategory}` – the subcategory of the element
* `{Family}` – the family name of the element
* `{FamilyAndType}` – the family name combined with the type name
* `{Type}` – the type name of the element

for example

```
Revit_{Project}::{Category}::{Family}_Type_{Type}::{Subcategory}
```

After the pattern line, you can **override** how `{Category}` prints by adding **category conversion** lines.

```makefile
RevitCategory=ReplacementText
```

fo example

```makefile
Walls=MKS_WALL
```

Lines in the mapping file that start with `#` are treated as **comments** and ignored during export.

#### Example Mapping File

```
# Pattern line: defines the overall structure
Revit_{Project}::{Category}::{Family}_Type_{Type}

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

# End of mapping file
```
