> ## 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.

# Features

export const app_0 = "AutodeskRevit"

export const versions_0 = "2020, 2021, 2022, 2023 and 2024"

export const connector_0 = "Revit"

<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>

<Info>
  Legacy Speckle supports {app_0} versions: {versions_0}
</Info>

In this page, we'll share how Revit Connector converts your Revit model into Speckle format and how it handles updating in Revit.

## Converting Revit data to Speckle

When sending from Revit, Speckle takes care of converting the data to a Speckle-friendly format. If you're curious about how this data is being structured, please have a look at our **[Objects kit class definitions](https://github.com/specklesystems/speckle-sharp/tree/master/Objects/Objects/BuiltElements)**.

For instance, a Revit room will look like this:

<img src="https://mintcdn.com/speckle-assistant/2orQqUKP95_W-JuF/images/legacy/revit/features-room-data.png?fit=max&auto=format&n=2orQqUKP95_W-JuF&q=85&s=e004851b780efc59d9eb134b9f8ed004" alt="Room data structure" width={350} data-path="images/legacy/revit/features-room-data.png" />

* At a high level we have all the main properties that define the room, such as:

  * name
  * area
  * number
  * geometry
  * category
  * etc.

For every category of element, you'll have some main properties quickly accessible at a high level. Keys and their values may change depending on the element.

All the other Revit parameters, both **type and instance**, are nested inside the **parameters** property. See an example below:

<img src="https://mintcdn.com/speckle-assistant/2orQqUKP95_W-JuF/images/legacy/revit/features-room-parameters.png?fit=max&auto=format&n=2orQqUKP95_W-JuF&q=85&s=b858f7e00acb1163fa56aecc4f19913d" alt="Room parameters" width={350} data-path="images/legacy/revit/features-room-parameters.png" />

* **ROOM\_AREA:** Internal Revit Name (API) of the Area parameter for Rooms.
* **name:** represents the name of the parameter. In the above image, it is "Area".
* **value:** represents the value of the parameter. In this case, it's "2233.64"
* **isShared:** True if parameter is a shared parameter.
* **isReadOnly:** True if parameter is a readonly parameter.
* **speckleType:** Speckle representation of the element. In this case, it is a "Objects.BuiltElements.Revit.Parameter" object.
* **and more…**

<Callout type="info">
  All the parameters are stored using their **internal Revit names**. You can see the full list of `BuiltInParameter` values **[here](https://www.revitapidocs.com/2022/fb011c91-be7e-f737-28c7-3f1e1917a0e0.htm)**. If you need to access their display name, just refer to the `name` property of each parameter, but please keep in mind these are not unique and can vary between languages.
</Callout>

## Updating elements in Revit

The connector takes care of updating received elements automatically where possible (instead of deleting and re-creating them). This is preferred, as Dimensions, ElementIds, and other annotations are preserved.

**Elements are updated under these two circumstances:**

* If the element was created in another project/software and had been received previously: for example, BuiltElements that were created in Rhino or Grasshopper.
* If the element was created in the same project you're working on: for example, if you send some walls to Speckle, edit them, and receive them again from the same model

Here are some technical details if you're curious about what's happening behind the scenes:

* BuiltElements have a property called `applicationId`, this is different from the `id/hash` property on them, and represents the id of such element in the host application in which it was first created. If the element was created in Revit it's the `UniqueId`, if coming from Grasshopper/Rhino an analogous field
* When a model is received in Revit the `applicationIds` of all BuiltElements created are cached in the receiver
* When receiving a second time from the same model, if the received elements have the same `applicationId` of something that was previously received (and it still exists in the document), the connector will attempt to modify them instead of creating new ones. If the update fails (or is not permitted by the API), it'll delete them and create new ones
* If no cached element is found, but there is an element in the document with a matching `applicationId` that is used for the update (this is the case of someone restoring changes previously sent, in the same project)
* If an element being received doesn't have an `applicationId` no update mechanism will happen (this could be the case of BuiltElements created in Python if no `applicationIds` are generated manually)

### Levels

Levels in Revit are updated following the logic described above with just one minor exception: if you receive a level in a model that already has a level at the same elevation, the existing one will be used and its name will be updated if needed. For example, you receive `Level 03` which is at 9000mm, in a file that has `3rd Floor` at 9000mm => `3rd Floor` will be renamed and used (we use a tolerance of 5mm for matching levels by elevation). NOTE: Levels are *not matched by name* as this could end up with undesired results.

## Family Editor

The Revit Connector also works in the Family Editor for asub set of element types.

## Linked models

The Revit Connector supports linked models, here's how it works.

### Sending linked models

The Revit Connector supports sending linked models. To enable this feature, go to Advanced Settings and select the option for [Sending Linked Models](/legacy/user/revit/advanced-settings#_2-send-linked-models) . Once this is done, you can use the selection filters as usual and any relevant items from the linked models will also be sent.

For instance: *Everything* will send all the models, *Category* filters will work in conjunction with any linked model elements, and *Selection* too.

#### Sending by view

When sending by **view**, the linked model support works as follows:

* **Revit 2024:** only elements of the linked models visible in the selcted view(s) will be sent
* **Revit 2023 and before:** The whole linked model is sent unless it is not visible in the selected view(s). This is a limitation of the Revit API.

<Warning>
  Multiple instances of the same linked model are currently not supported on sending.
</Warning>

### Receiving linked models

Revit Connector also supports receiving linked elements. To enable this option, Go to Advanced Settings and check [Receiving Linked Models](/legacy/user/revit/advanced-settings#_3-receive-linked-models). On receiving we do not attempt to modify linked model files in any way, but when the *Receive Linked Models* setting is turned on, the linked model elements will be received in the current document as any other element.

## Design options

The Connector also supports Revit design options and you can publish different options of your model to Speckle.

<img src="https://mintcdn.com/speckle-assistant/2orQqUKP95_W-JuF/images/legacy/revit/features-design-options.png?fit=max&auto=format&n=2orQqUKP95_W-JuF&q=85&s=cdb2f8f632920d6ac0c449f01b0f9452" alt="Design options" width={250} data-path="images/legacy/revit/features-design-options.png" />

### How does it work?

If the selection filter is set to **Everything**, the Connector sends the **Main model** and any objects that are part of a **primary** design option by default. To publish other options with the Main model, simply select any other option from the Design Options drop-down.

### Using 3D views

You can also set up a view in Revit and associate desired options with it in the **Visibility/Graphic Overrides**, see **Design Options** tab.

<img src="https://mintcdn.com/speckle-assistant/2orQqUKP95_W-JuF/images/legacy/revit/features-vg-design-options.png?fit=max&auto=format&n=2orQqUKP95_W-JuF&q=85&s=ec64f02fcf9d0f8f55d75ee331b351ab" alt="Visibility/Graphic Overrides" width="2000" height="486" data-path="images/legacy/revit/features-vg-design-options.png" />

Then choose **View** selection filter in the Connector and pick a view. Only objects visible in this view will be sent to Speckle, which allows you to organise your Revit model for quick and easy publishing.

<img src="https://mintcdn.com/speckle-assistant/2orQqUKP95_W-JuF/images/legacy/revit/features-send-3d-view.png?fit=max&auto=format&n=2orQqUKP95_W-JuF&q=85&s=e2e90a0c093f08008211f28ae02943b4" alt="Send 3D view" width={350} data-path="images/legacy/revit/features-send-3d-view.png" />

## Using the Scheduler (Alpha)

Sometimes, you might want to send data to Speckle automatically, based on a few triggers. For this, we have added a "**Scheduler**" functionality to the Revit Connector.

Before using the Scheduler, you need to **send your model** through the connector interface. (*Note: Make sure to select the selection filter you intend to use when the scheduler is triggered, for instance, to send all the model or a particular view.*)

<img src="https://mintcdn.com/speckle-assistant/fg3pAWkGJ20EuRbE/images/legacy/revit/scheduler.png?fit=max&auto=format&n=fg3pAWkGJ20EuRbE&q=85&s=9ec3b219d97ecd9caf362a5a19803802" alt="Scheduler interface" width={350} data-path="images/legacy/revit/scheduler.png" />

1. **Enabled**: When turned on, Scheduler will send the model to selected **Project** with the selected **Trigger**)

2. Select **Project**: Select the project card you used in the connector interface.

   <Note>
     Currently, only one scheduler can be set per file. We are planning to enable setting up multiple schedulers from the Main Connector interface.
   </Note>

3. Select **Trigger**: Currently the following triggers are available:
   * **On File Save**
   * **On Sync To Central**
   * **On File Export**

4. Click "**Save**".

That's it! Every time you save your file, for instance, your data will be sent to Speckle.
