> ## Documentation Index
> Fetch the complete documentation index at: https://speckle-assistant.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Mapping Tool (alpha)

export const connector_0 = "Mapping Tool"

<div class="callout my-4 px-5 py-4 overflow-hidden rounded-2xl flex gap-3 border-2 border-red-600 bg-red-100/50 dark:border-red-600 dark:bg-red-400/20" data-callout-type="warning">
  <div class="mt-0.5 w-4" data-component-part="callout-icon">
    <svg class="flex-none w-5 h-5 text-red-700 dark:text-red-300" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2" aria-label="Warning">
      <path stroke-linecap="round" stroke-linejoin="round" d="M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z" />
    </svg>
  </div>

  <div class="text-sm prose min-w-0 w-full text-red-700 dark:text-red-300" data-component-part="callout-content">
    <b>Notice</b>: This user guide is based on the legacy {connector_0} connector.<br />
    We recommend using our new connectors instead, as they are easier to use and actively maintained. This legacy documentation may not be up to date.
  </div>
</div>

<Note>
  The Speckle Mapping Tool, is a feature available in some of our connectors that allows for even greater control when sending CAD data to BIM software as it allows to map simple CAD geometry to native BIM elements.

  For example, it allows to receive Rhino lines as beams in Revit, and so on.

  Currently, the Mapping tool is only available for Rhino > Revit workflows; in the future it'll be expanded to others like AutoCAD > Archicad or Civil 3D > Tekla and so on.
</Note>

## How does it work?

This feature relies on having some data such as families, types, levels etc, available, and the first step is to send these to Speckle form the BIM tool.
Then, you will be able to map these to the supported elements from within the CAD tool. And finally, you just need to send the mapped element from the CAD tool to the BIM one.

See below the required steps for a Rhino > Revit workflow.

### Revit setup

In Revit create or open a document with all the levels, families and types that you're planning to use.
Then send to Speckle only its levels, families and types.

We recommend using a model for this, and updating it over time as you add more levels and types.

<Frame>
  <img src="https://user-images.githubusercontent.com/2679513/203250688-83d4cf52-d800-41be-b217-ac45cace6a9f.png" alt="Revit Setup" />
</Frame>

### Rhino setup

In Rhino, type the `SpeckleMappings` command, this will open up a new panel (Windows) or window (Mac) with the mapping tool.

<Frame>
  <img src="https://user-images.githubusercontent.com/2679513/203253776-f7899083-5e94-4264-8840-f4941f4b32e1.png" alt="Rhino Setup" />
</Frame>

Click on `Select Mapping Source` and select the project and model with the Revit data we just sent:

<Frame>
  <img src="https://user-images.githubusercontent.com/2679513/203254063-5cf9e507-ee22-4969-8613-696bb84b3f49.gif" alt="select-mapping-source" />
</Frame>

You're now ready to map!

<Info>
  ☝️ <b>NOTE:</b> The available elements depend on the provided families and types. So, if your Revit document did not have any Beam types available, this option will not be available in the Mapping tool.
</Info>

### Mapping Rhino geometry to Revit elements

After selecting a mapping source, you just need to select model elements of similar types, and set the respective mappings and properties, then click on Apply.

<Frame>
  <img src="https://user-images.githubusercontent.com/2679513/203260126-d0136aeb-9ec4-4358-8868-fa4e7e02bbc3.gif" alt="mapping" />
</Frame>

Finally, send these objects:

<Frame>
  <img src="https://user-images.githubusercontent.com/2679513/203260338-76ae8c08-365d-496f-93ee-802645269e9b.gif" alt="mapping-selection" />
</Frame>

And receive them in a Revit a project that has the needed types and levels:

<Frame>
  <img src="https://user-images.githubusercontent.com/2679513/203261807-6c1eb95c-9433-4cf1-bb0b-00f597bcbf56.gif" alt="mapping-revit" />
</Frame>

### Supported Mappings Rhino > Revit

| Rhino Geometry | Revit Element  |
| -------------- | -------------- |
| Extrusion      | Wall           |
| Mesh           | DirectShape    |
| Mesh           | Topography     |
| Brep           | DirectShape    |
| Point          | FamilyInstance |
| Block          | FamilyInstance |
| Surface        | Floor          |
| Line           | Beam           |
| Line           | Brace          |
| Line           | Pipe           |
| Line           | Duct           |
| Line           | Column         |
