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

# Dynamo for Revit

export const app_0 = "Dynamo"

export const versions_0 = "2.1 to 2.10"

export const connector_0 = "Dynamo"

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

<Note>
  The Speckle node package is not available from Dynamo's Package Manager. For installation instructions, see the section below.
</Note>

<Note>
  We have renamed some core concepts in Speckle to be more widely understandable.

  * <i>Streams</i> have been renamed to <b>projects</b>
  * <i>Branches</i> have been renamed to <b>models</b>
  * <i>Commits</i> have been renamed to <b>versions</b>
</Note>

## Getting started

Our Dynamo Connector takes the form of a node package, which is installed via the Speckle Manager. To install the Dynamo Connector and add your Speckle account, follow the instructions in our [Speckle Manager](/legacy/user/manager) section.

<Frame>
  <img src="https://mintcdn.com/speckle-assistant/gxrCTSD3wKeQl26b/images/legacy/dyn/nodes-cat-all.png?fit=max&auto=format&n=gxrCTSD3wKeQl26b&q=85&s=330b063d31d7b34aecbad9c36018f8a5" alt="Dynamo Connector components" width="308" height="124" data-path="images/legacy/dyn/nodes-cat-all.png" />
</Frame>

Once installed, the **Dynamo Connector** will appear as a node package in your library as `Speckle 2`.

The `Speckle 2` package contains the main nodes necessary to use Speckle within Dynamo, including nodes for sending and receiving data, managing streams and selecting accounts.

We've also built a few nodes for more advanced use cases, as well as some handy tools for Speckle developers/hackers (these are found in the `Developer Tools` sub-section of the package).

## Streams and URLs

Speckle Streams are identified by their URLs.
Across our Dynamo and Grasshopper connectors you'll see URLs in 3 different formats:

* `https://app.speckle.systems/streams/3073b96e86` points to the `main` branch on Stream `3073b96e86`
* `https://app.speckle.systems/streams/3073b96e86/branches/dev` points to a branch named `dev` on Stream `3073b96e86`
* `https://app.speckle.systems/streams/3073b96e86/commits/604bea8cc6` points to a specific commit `604bea8cc6` on Stream `3073b96e86`
* `https://app.speckle.systems/streams/3073b96e86/objects/df7b8bafccefa791d82939dd36541189` points to a specific object `df7b8bafccefa791d82939dd36541189` on Stream `3073b96e86`

<Info>
  Unsure about what *commits* and *branches* are? No worries, you don't need to know what they are to use Speckle!
</Info>

We'll see how branch and commit URLs are used in the following sections.

## Sending data

Let's look at how we would send some data in Dynamo. First, start by creating a new `Send Data` node.

<Frame>
  <img src="https://mintcdn.com/speckle-assistant/gxrCTSD3wKeQl26b/images/legacy/dyn/nodes-send.png?fit=max&auto=format&n=gxrCTSD3wKeQl26b&q=85&s=74dea76989adf1b490d5e8590d1c4f09" alt="Send node" width="305" height="221" data-path="images/legacy/dyn/nodes-send.png" />
</Frame>

In order to select which stream to send data to, you just need to pass a stream URL to the `streamUrl` port.

<Frame>
  <img src="https://mintcdn.com/speckle-assistant/LgW4oTl4u3hNVExG/images/legacy/dyn/sending-multiple-branches.png?fit=max&auto=format&n=LgW4oTl4u3hNVExG&q=85&s=fe76bb953fdba08ddfc95746fe23d7a4" alt="Sending to multiple branches" width="745" height="620" data-path="images/legacy/dyn/sending-multiple-branches.png" />
</Frame>

Alternatively, you can also use one of the following nodes to create / retrieve existing streams:

* [Create Stream](#create-stream)
* [Get Stream](#get-stream)
* [List Streams](#list-streams)

<Info>
  You cannot send data to a specific commit. Commits are a snapshot of data at a specific point in time and therefore cannot be edited.
</Info>

### Adding objects

In order to select which objects to should be sent to your stream, you just need to connect the desired data to the `data` input in the `Send Data` node. The node will automatically convert any supported Dynamo objects into a Speckle-compatible format.

### Adding a commit message

Although optional, it's considered good practice to add a "commit message" whenever you send you data (especially if working with others). This message should describe the changes being pushed. You can add a commit message by passing any string to the `message` port.
The commit message will be visible in the Speckle Web App (where you will also be able to edit it).

### Sending data

With a Stream URL and some data to send, the only thing left to do is to press the **Send button**. This will begin the process of translating your data to Speckle's object model and uploading it to your Speckle server.

<Frame>
  <img src="https://mintcdn.com/speckle-assistant/gxrCTSD3wKeQl26b/images/legacy/dyn/dyn-send.gif?s=ad2d553142123b2053900e0e2835a126" alt="Sending data in Dynamo" width="799" height="350" data-path="images/legacy/dyn/dyn-send.gif" />
</Frame>

### Viewing a stream online

To view the sent stream online you can just right click on the sender node:

<Frame>
  <img src="https://mintcdn.com/speckle-assistant/LgW4oTl4u3hNVExG/images/legacy/dyn/viewing-a-stream-online.png?fit=max&auto=format&n=LgW4oTl4u3hNVExG&q=85&s=306126adc1ebf328b4b536ddba622642" alt="Viewing a stream online" width="1017" height="444" data-path="images/legacy/dyn/viewing-a-stream-online.png" />
</Frame>

### Sending to a specific branch

When using a stream URL, by default, the `main` branch is used to send and receive data.

To send to a specific branch, simply use the branch URL, such as: `https://app.speckle.systems/streams/3073b96e86/branches/dev`.

## Receiving data

Receiving data is very simple, you just need a `Receive Data` node, and a stream URL.

<Frame>
  <img src="https://mintcdn.com/speckle-assistant/gxrCTSD3wKeQl26b/images/legacy/dyn/dyn-receive.gif?s=111471dd60a2dbc83224e640f36bd793" alt="Receiving data in Dynamo" width="779" height="336" data-path="images/legacy/dyn/dyn-receive.gif" />
</Frame>

When new data is pushed to this stream a notification will appear on the receive node.

### Auto receiving

By using the toggle on the node, you can enable/disable auto receiving. If enabled, new data pushed to this stream will be pulled automatically as it's available.

### Receiving a specific branch

When using a stream URL, the `main` branch is used to send and receive data by default.

You can also receive data from a specific branch; simply use the branch URL, such as: `https://app.speckle.systems/streams/3073b96e86/branches/dev`.

### Receiving a specific commit

We've already seen how to retrieve data from streams and branches. It's possible to go even deeper, retrieving data from specific commits. To do this, simply use the commit URL, such as: `https://app.speckle.systems/streams/3073b96e86/commits/604bea8cc6`

<Info>
  When receiving from a commit, the node will stop showing notifications about new activity and the auto-receive toggle will be disabled. This is because commits cannot be edited.
</Info>

<Frame>
  <img src="https://mintcdn.com/speckle-assistant/gxrCTSD3wKeQl26b/images/legacy/dyn/image-20210322172730078.png?fit=max&auto=format&n=gxrCTSD3wKeQl26b&q=85&s=ec212217fbad3ff4595c4fe2912df2ea" alt="Receiving from a specific commit" width="481" height="239" data-path="images/legacy/dyn/image-20210322172730078.png" />
</Frame>

### Receiving a specific object

Similarly to commits, you can also point the receive node to a specific object. To do this, simply use the object's URL, such as: `https://app.speckle.systems/streams/3073b96e86/objects/df7b8bafccefa791d82939dd36541189`.

Like commits, objects in a commit cannot be edited, so the data received using such a URL will always be consistent. You can find the ID of an object from the Speckle Web interface:

<Frame>
  <img src="https://mintcdn.com/speckle-assistant/gxrCTSD3wKeQl26b/images/legacy/dyn/image-20210322185007725.png?fit=max&auto=format&n=gxrCTSD3wKeQl26b&q=85&s=44d3679f995090a7198ff4b27b04bdfe" alt="Finding object ID in web interface" width="522" height="337" data-path="images/legacy/dyn/image-20210322185007725.png" />
</Frame>

### Viewing a stream online

To view the received stream online you can just right-click on the receiver node:

<Frame>
  <img src="https://mintcdn.com/speckle-assistant/LgW4oTl4u3hNVExG/images/legacy/dyn/viewing-a-stream-online.png?fit=max&auto=format&n=LgW4oTl4u3hNVExG&q=85&s=306126adc1ebf328b4b536ddba622642" alt="Viewing a stream online" width="1017" height="444" data-path="images/legacy/dyn/viewing-a-stream-online.png" />
</Frame>

## Creating custom objects

A `Custom Object` is a Base Object with custom properties assigned to it. It's basically a custom data structure you can create to send data in a specific format that you define.

In Dynamo, we use dictionaries to represent custom objects since they are natively supported, so creating custom objects is as simple as creating a dictionary containing the keys and values you wish to include in the `Base` object.

This dictionary will be automatically converted to a `Base` object during the *Send* operation.

<Frame>
  <img src="https://mintcdn.com/speckle-assistant/gxrCTSD3wKeQl26b/images/legacy/dyn/guide-custom-objects.png?fit=max&auto=format&n=gxrCTSD3wKeQl26b&q=85&s=87a1d4c6f9435e62c9cd83f762737cbd" alt="Creating custom objects" width="827" height="392" data-path="images/legacy/dyn/guide-custom-objects.png" />
</Frame>

## All Speckle nodes

### Send data

<Frame>
  <img src="https://mintcdn.com/speckle-assistant/gxrCTSD3wKeQl26b/images/legacy/dyn/nodes-send.png?fit=max&auto=format&n=gxrCTSD3wKeQl26b&q=85&s=74dea76989adf1b490d5e8590d1c4f09" alt="Send node" width="305" height="221" data-path="images/legacy/dyn/nodes-send.png" />
</Frame>

The **Send Data** node performs sending operations. Data is usually sent to a Speckle Server, but the node also supports sending to a different data storage using *transports*. Whenever possible, the *Send* node will try to convert any compatible objects into Speckle format.

There is also an switch you can toggle to enable the node to send automatically the data whenever it changes.

#### Input

* *data*: This port will accept almost anything you give it! If the objects provided are not `Base` objects, it will also perform the conversion to Speckle automatically.
* *streamUrl*: Supports any generated stream from within the `Stream` component category, but also *stream urls* in text format.
* *message (optional)*: The message you want to attach to the *commit* when you send the data. Defaults to `"Dynamo push"`.

#### Output

* *streamUrl*: The *commit url* pointing to the objects in the Speckle server.

### Receive data

<Frame>
  <img src="https://mintcdn.com/speckle-assistant/gxrCTSD3wKeQl26b/images/legacy/dyn/nodes-receive.png?fit=max&auto=format&n=gxrCTSD3wKeQl26b&q=85&s=86ae9fab6c86db138f284d2cb85c094c" alt="Receive Data" width="297" height="244" data-path="images/legacy/dyn/nodes-receive.png" />
</Frame>

The **Receive Data** node fetches data from a specified `Stream` or any other valid `Transport`. Whenever possible, the receiver node will try to convert all Speckle objects into compatible objects.

#### Inputs

* *streamUrl*: The URL of any Speckle stream, branch, commit or object.

#### Outputs

* *data*: Any data that was received from the stream.

### Send local data

<Frame>
  <img src="https://mintcdn.com/speckle-assistant/gxrCTSD3wKeQl26b/images/legacy/dyn/nodes-send-local.png?fit=max&auto=format&n=gxrCTSD3wKeQl26b&q=85&s=6735d362f5763aaea88082d844d83039" alt="Send local node" width="171" height="93" data-path="images/legacy/dyn/nodes-send-local.png" />
</Frame>

The **Send Local Data** node performs sending operations directly to the users's local database.

#### Inputs

* *data*: The data to be sent locally. This port will accept almost anything you give it. If the objects provided are not `Base` objects, it will also perform the conversion to Speckle automatically.

#### Outputs

* *localDataId*: The unique `id` for the data that was locally sent.

### Receive local data

<Frame>
  <img src="https://mintcdn.com/speckle-assistant/gxrCTSD3wKeQl26b/images/legacy/dyn/nodes-receive-local.png?fit=max&auto=format&n=gxrCTSD3wKeQl26b&q=85&s=b6b14069ff110a0064e28caf56d83ee9" alt="Receive local node" width="170" height="88" data-path="images/legacy/dyn/nodes-receive-local.png" />
</Frame>

The **Receive Local Data** node performs receive operations in the same way as the [Receive Data](#receive-node) node, the only difference is that data is received locally from the Speckle's user local database, instead of the server or any other transport.

#### Inputs

* *localDataId*: The unique `id` for the data you want to fetch locally. This would be provided from a [Send Local Data](#local-send-node) node.

#### Outputs

* *Data*: The data that was received. This port will accept almost anything you give it. If the objects provided are not `Base` objects, it will also perform the conversion to Speckle automatically.

### Select account

<Frame>
  <img src="https://mintcdn.com/speckle-assistant/gxrCTSD3wKeQl26b/images/legacy/dyn/nodes-accounts.png?fit=max&auto=format&n=gxrCTSD3wKeQl26b&q=85&s=534e585f139fd37449c8fb993d56164b" alt="Accounts node" width="288" height="131" data-path="images/legacy/dyn/nodes-accounts.png" />
</Frame>

The **Select Account** node provides a fast way of selecting different Speckle accounts.

> Accounts must be set-up in your computer using the **Speckle Manager**.

### Create stream

To create a new stream, right-click on the canvas and search for the `Create Stream` node. This node has a custom UI that allows you to select a specific account to use, and a button to confirm the stream creation.

<Callout type="info">
  You can also create streams online form Speckle Web. From there you can also set their name, description and permissions.
</Callout>

Once created, the node will remember that stream. Meaning you will not be able to *change* the stream you created, or create a new one using the same node (to do this, just place a new `Create Stream` node).

Select the appropriate account and press the blue button. If the stream creation was successful, the output of the node should be a *stream url* pointing to the newly created stream and linked to the specified account.

<Frame>
  <img src="https://mintcdn.com/speckle-assistant/gxrCTSD3wKeQl26b/images/legacy/dyn/guide-stream-create.gif?s=3a51a59a8e70b7e38c844e5b2cef4d35" alt="Creating a stream" width="599" height="313" data-path="images/legacy/dyn/guide-stream-create.gif" />
</Frame>

#### Viewing the stream online

To view the newly-created stream online you can just right click on the node:

<Frame>
  <img src="https://mintcdn.com/speckle-assistant/LgW4oTl4u3hNVExG/images/legacy/dyn/viewing-the-stream-online.png?fit=max&auto=format&n=LgW4oTl4u3hNVExG&q=85&s=b118835c5d13d7613cc8f45b7f6c38aa" alt="Viewing the stream online" width="687" height="451" data-path="images/legacy/dyn/viewing-the-stream-online.png" />
</Frame>

#### Inputs

> This node has no inputs.

#### Outputs

* *streamUrl*: A URL, pointing to the newly-created stream.

### Get stream

<Frame>
  <img src="https://mintcdn.com/speckle-assistant/gxrCTSD3wKeQl26b/images/legacy/dyn/nodes-stream-get.png?fit=max&auto=format&n=gxrCTSD3wKeQl26b&q=85&s=71e2c527489681590f07231e68521951" alt="Stream get node" width="192" height="112" data-path="images/legacy/dyn/nodes-stream-get.png" />
</Frame>

The **Get Stream** node will try to retrieve an existing `Stream`, given its URL and a specific account to access that stream with. This may be useful if there are multiple accounts registered on the same machine and a certain stream requires a specific account to be accessible.

#### Inputs

* *streamUrl*: The URL of any Speckle stream, branch, commit or object.
* *account (optional)*: A Speckle account, provided by the **Accounts node**. If no account is provided, the *default account* will be used.

#### Outputs

* *stream*: A `Stream` object pointing to existing stream. If the stream doesn't exist, an error will be shown.

### List streams

<Frame>
  <img src="https://mintcdn.com/speckle-assistant/LgW4oTl4u3hNVExG/images/legacy/dyn/nodes-stream-list.png?fit=max&auto=format&n=LgW4oTl4u3hNVExG&q=85&s=17d357f64b9d160558df47bcdc706964" alt="Stream list node" width="184" height="112" data-path="images/legacy/dyn/nodes-stream-list.png" />
</Frame>

The **List Streams** node returns a specified amount of streams available in an account. For performance reasons, it has been limited to fetching a maximum of 20 streams.

#### Inputs

* *account (optional)*: A Speckle account, provided by the **Accounts node**. If no account is provided, the *default account* will be used.
* *limit (optional)*: The number of streams to fetch from the server.

#### Outputs

* *streams*: List of `Stream` objects available to the specified account.

### Stream details

<Frame>
  <img src="https://mintcdn.com/speckle-assistant/gxrCTSD3wKeQl26b/images/legacy/dyn/nodes-stream-details.png?fit=max&auto=format&n=gxrCTSD3wKeQl26b&q=85&s=61d382343b55c3819cbe369931b2b378" alt="Stream details node" width="173" height="86" data-path="images/legacy/dyn/nodes-stream-details.png" />
</Frame>

The **Stream Details** node returns all relevant information related to a specific `Stream`.

#### Inputs

* *stream*: Supports any generated stream from within the `Stream` component category, but also *stream urls* in text format.

#### Output

* *stream*: The unique `id` that identifies the stream.
* *name*: The name of the stream.
* *description*: The description of the stream.
* *createdAt*: The date this stream was created.
* *updatedAt*: The date marking the last time the stream was updated.
* *public*: Boolean value indicating if the stream is public or private.
* *collaborators*: A list of collaborators that have access to this stream, as well as their roles.
* *branches*: A list of available branches for this stream.

### Update stream

<Frame>
  <img src="https://mintcdn.com/speckle-assistant/LgW4oTl4u3hNVExG/images/legacy/dyn/nodes-stream-update.png?fit=max&auto=format&n=LgW4oTl4u3hNVExG&q=85&s=fb7ab2790172fe1d8b55433ed29f0525" alt="Stream update node" width="180" height="165" data-path="images/legacy/dyn/nodes-stream-update.png" />
</Frame>

The **Update Stream** node allows for updating a stream's *name*, its *description* and whether it is *public* (publicly available to read by anyone with the *stream url*) or *private* (only invited collaborators can view this stream).

#### Inputs

* *streamUrl*: The URL of a stream, branch, commit or object.
* *name (optional)*: Text string with the new name for the stream.
* *description (optional)*: Text string with the new description for the stream.
* *isPublic (optional)*: Boolean value to activate/deactivate this stream's *link sharing*.

#### Output

* *streamUrl*: The URL of the updated stream.

### Developer tools

These nodes were developed exclusively for testing/development purposes. If you don't know what these are, you most likely won't ever need them.

#### Convert to Speckle

<Frame>
  <img src="https://mintcdn.com/speckle-assistant/gxrCTSD3wKeQl26b/images/legacy/dyn/nodes-convert-tospeckle.png?fit=max&auto=format&n=gxrCTSD3wKeQl26b&q=85&s=24938aecfd2812a91629599318d1a687" alt="Convert to Speckle node" width="177" height="87" data-path="images/legacy/dyn/nodes-convert-tospeckle.png" />
</Frame>

The **Convert to Speckle** node will convert any supported objects (such as lines, curves, meshes...) into Speckle ones.

This node was developed for testing/development purposes, as the Send/Receive nodes will already perform this conversion step automatically.

#### Convert to Native

<Frame>
  <img src="https://mintcdn.com/speckle-assistant/gxrCTSD3wKeQl26b/images/legacy/dyn/nodes-convert-tonative.png?fit=max&auto=format&n=gxrCTSD3wKeQl26b&q=85&s=f71e54570f8446c0d228c98ca329497d" alt="Convert to Native node" width="177" height="86" data-path="images/legacy/dyn/nodes-convert-tonative.png" />
</Frame>

The **Convert to Native** node will convert any supported Speckle objects into compatible objects.

This node was developed for testing/development purposes.

#### Serialize to JSON

<Frame>
  <img src="https://mintcdn.com/speckle-assistant/gxrCTSD3wKeQl26b/images/legacy/dyn/node-serialize.png?fit=max&auto=format&n=gxrCTSD3wKeQl26b&q=85&s=905c760d7c93d71f0db6f527efe8ed4e" alt="Serialize objects node" width="132" height="84" data-path="images/legacy/dyn/node-serialize.png" />
</Frame>

The **Serialize to JSON** node will convert any Speckle object into `JSON` formatted text.

#### Deserialize from JSON

<Frame>
  <img src="https://mintcdn.com/speckle-assistant/gxrCTSD3wKeQl26b/images/legacy/dyn/nodes-deserialize.png?fit=max&auto=format&n=gxrCTSD3wKeQl26b&q=85&s=c3965b67179a44444dd25c24bcdf6584" alt="Deserialize objects node" width="160" height="85" data-path="images/legacy/dyn/nodes-deserialize.png" />
</Frame>

The **Deserialize from JSON** node will convert a serialized Speckle object in `JSON` format into `Base` Speckle objects.

#### Server Transport

<Frame>
  <img src="https://mintcdn.com/speckle-assistant/LgW4oTl4u3hNVExG/images/legacy/dyn/nodes-transports-server.png?fit=max&auto=format&n=LgW4oTl4u3hNVExG&q=85&s=f502784ae5d0ce61018bd80fb992f71b" alt="Server transport node" width="171" height="85" data-path="images/legacy/dyn/nodes-transports-server.png" />
</Frame>

Creates a connection to a specific Speckle Server.

#### SQLite Transport

<Frame>
  <img src="https://mintcdn.com/speckle-assistant/LgW4oTl4u3hNVExG/images/legacy/dyn/nodes-transport-sqlite.png?fit=max&auto=format&n=LgW4oTl4u3hNVExG&q=85&s=b4b6e57d17dedc2ba20d030e55a1004f" alt="SQLite Transport" width="196" height="139" data-path="images/legacy/dyn/nodes-transport-sqlite.png" />
</Frame>

Creates a connection to a specific SQLite database.

#### Disk Transport

<Frame>
  <img src="https://mintcdn.com/speckle-assistant/LgW4oTl4u3hNVExG/images/legacy/dyn/nodes-transport-disk.png?fit=max&auto=format&n=LgW4oTl4u3hNVExG&q=85&s=94193a1f81cdea9ce181211344ad55d2" alt="Disk transport" width="183" height="84" data-path="images/legacy/dyn/nodes-transport-disk.png" />
</Frame>

Creates a connection to a specific file in the computer's disk, where the data will be saved in JSON format.

#### Memory Transport

<Frame>
  <img src="https://mintcdn.com/speckle-assistant/LgW4oTl4u3hNVExG/images/legacy/dyn/nodes-transport-memory.png?fit=max&auto=format&n=LgW4oTl4u3hNVExG&q=85&s=ed5d151833897cee8e6cf36dad44ddb7" alt="Memory transport" width="163" height="84" data-path="images/legacy/dyn/nodes-transport-memory.png" />
</Frame>

Creates a connection to in-memory storage.
