> For the complete documentation index, see [llms.txt](https://docs.rayon.design/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.rayon.design/core-concepts/design/blocks.md). Agents can also search and read this documentation through its [MCP server](https://docs.rayon.design/~gitbook/mcp).

# Blocks

How to use block libraries in Rayon.

Here is all you need to know about **using** and **creating blocks.**

### **Creating blocks**

In Rayon, **blocks allow you to group elements** and **save them into your block library.**\
Once saved, you can place as many copies of the block as you like. Each copy is an *instance*, and the saved block is its *definition*. Every instance stays tied to its definition, so editing the definition changes all its instances in your model.

To create a **new block**...

* **Select the elements** you want to save as a block.
* Click on the **`Block`** button (**`CMD/CTRL`** + **`B`**) in the bottom toolbar.
* Your **new block is added to** **`My blocks`**, in the block panel on the left.
* Double-click on the block name to **rename** it, or right-click the block in **`My blocks`** and choose **`Rename`**.
* **You can now drag and drop the block on your canvas** to insert as many instances as you want.

Alternatively, blocks can be created **through the import of DWG/DXF files**, as Rayon can detect AutoCAD blocks, and turn them automatically into Rayon blocks.

### Editing vs overriding blocks

Blocks can be either **edited** or **overridden**.

<figure><img src="https://2112124689-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FngVHKyaUSSJPTFck3wkz%2Fuploads%2F6vugOEL9E3PczbjOs5uq%2Fblocks-selection-bar.png?alt=media" alt="The selection bar with the Override and Edit buttons, above the bottom toolbar with the Block button."><figcaption></figcaption></figure>

**Editing** a block means editing its underlying block definition.

* Any changes made in edit mode will be applied to all instances of that block in your model.
* Editing can be accessed in the selection bar, by double-clicking on a block instance, or by pressing **`CMD/CTRL`** + **`E`**.
* **`Edit in isolation`**, in the right-click menu or with **`CMD/CTRL`** + **`OPT`** + **`E`**, opens the definition away from the rest of your canvas. **`Edit`**, in the options of a block in **`My blocks`**, does the same.

**Overriding** a block means changing the look (styles, text, visibility, and opacity) of a single block instance.

* Any overrides applied to an instance will be carried by this instance, and only this one, while it will keep its tie to its definition.
* Overriding can be accessed in the selection bar, or by pressing **`CMD/CTRL`** + **`O`**.
* At any point, overrides on a block can be reset. In the right-click menu, open **`Reset overrides`**, then pick a type of override, or **`All`**. This row only shows when the block has overrides.

{% embed url="<https://player.vimeo.com/video/1246533738?autoplay=1&controls=0&loop=1&muted=1>" %}

**Making a block unique** means converting it into its own definition.

* In other words, at any point, a block instance can be separated from its definition, and turned into its own, unique definition.
* The **`Make unique`** option can be accessed in the right-click menu on a block, or by pressing **`CMD/CTRL`** + **`U`**.

**Unblocking** a block means turning an instance back into separate elements, with no tie to a definition.

* The **`Unblock`** option can be accessed in the right-click menu on a block, or by pressing **`CMD/CTRL`** + **`SHIFT`** + **`B`**.

### Using the block panel

The block panel works with 2 tabs:

* **`My blocks`**: this tab displays the blocks stored in your current model, including those you have created.
* **`Libraries`**: this tab gives you access to blocks contained in libraries you have created, or contained in Rayon libraries.

<figure><img src="https://2112124689-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FngVHKyaUSSJPTFck3wkz%2Fuploads%2FGaCxXn1AkvNJHqdaIbdG%2Fblocks-panel-tabs.png?alt=media" alt="The block panel with the My blocks and Libraries tabs, the filter button in the search field, and the Publish button."><figcaption></figcaption></figure>

**`My blocks`** displays the blocks in your model that fit your current canvas. Any block stored there is called a block *definition*. It is the parent of all its copies (called instances) inserted on the canvas. Changing a definition (its geometry, its properties, etc.) will affect all instances on the canvas. At any point, a definition can be dragged and dropped on the canvas to create **a block instance.**

Right-click on a block in **`My blocks`** to see its options.

By default, a filter shows only the blocks made for your kind of canvas: model or paper. The badge on the filter button shows it is on. On a 3D canvas, the panel lists only 3D blocks.

A 2D block can only be placed on a 2D canvas, and a 3D block on a 3D canvas. If a block is missing, check which canvas you are on. More about 3D blocks in our page about [libraries in 3D](https://docs.rayon.design/core-concepts/work-in-3d/libraries-in-3d.md).

To reach a definition from a block instance on the canvas, use **`Select block definition`** in the right-click menu, or the arrow next to its **`Definition`** card in the properties panel.

When your model has no blocks yet, **`My blocks`** offers **`Open libraries`**, **`Generate tracing`** and **`Generate block`**. More about the last two in our page about [the AI toolbox](https://docs.rayon.design/core-concepts/work-with-ai/the-ai-toolbox.md).

In the **`Libraries`** tab of the block panel, typing (almost) any item name will return blocks from Rayon's libraries or those of your team. Rayon offers over 1,000 blocks, for all types of programs.

Click on a result to open its preview. There, **`Import`** adds the block to **`My blocks`**, and **`Insert to canvas`** also places it on your canvas. You can also drag a result onto the canvas.

<figure><img src="https://2112124689-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FngVHKyaUSSJPTFck3wkz%2Fuploads%2FitqoVgjGKjGwvQcafCuZ%2Fblocks-libraries-tab.png?alt=media" alt="The Libraries tab with a search, the Filters column open, and a block preview with the Import and Insert to canvas buttons."><figcaption></figcaption></figure>

You can also search library blocks from the command line. Press **`CMD/CTRL`** + **`K`**, open the **`Blocks`** tab, type a name, and click on a block to insert it.

In both tabs, you are also able to filter what appears.

* In **`My blocks`**, the filter button in the search field opens **`Block filters`**.
* In **`Libraries`**, the **`Filters`** icon opens a column of checkboxes, such as **`Category`** and **`Usual room type`**.
* Also in **`Libraries`**, the **`All libraries`** dropdown in the search field picks one library. The dropdown next to it picks the view of the block, such as **`Top`** or **`Front`**.

The three-dot menu at the top of the panel changes how results look, with **`Show as`** (**`List`**, **`Grid`** or **`Large tiles`**). In **`My blocks`**, the same menu has **`Sort by`** (**`Block name`**, **`Instances count`** or **`Library name`**). Sorting by **`Library name`** groups your blocks by library. **`Delete unused blocks`**, also in this menu, removes the blocks your model does not use.

Finally, in the **`My blocks`** tab, you will find the **`Publish`** button, next to the search field. It opens a dialog where you choose the blocks to publish. You only see the button if you are an owner or admin of the model, and the model has blocks to publish or was published before.

Published blocks can be retrieved from other models. Who can use them depends on where the model lives: you only, your team, or the members of the workspace. The info icon in the dialog tells you which.

More about publication in our page about [libraries](https://docs.rayon.design/core-concepts/standards/publishing-a-library.md).

### Updating blocks from a library

A block imported from a library stays linked to that library. You can edit it in your model, and the library does not change.

To bring it back in line with the library, or to cut the link, use its options in **`My blocks`**:

* **`Update from library`** replaces the block with the latest library version. You confirm first, because this discards any change made to the block.
* **`Detach from library`** turns the block into a local copy, which no longer updates from the library.

On a family card, both options apply to all the blocks of the family that come from a library.

With the block selected in **`My blocks`**, the **`Block`** section of the properties panel has the same actions as icon buttons: detach on its **`From`** row and, when the block has a library version, update on its **`Version`** row.

If you insert a library block that is already in your model, a message offers **`Keep current version`** or **`Update`**.

### Block families <a href="#h_bc50d77b6b" id="h_bc50d77b6b"></a>

**Blocks can be grouped in Rayon, to gather blocks that belong together.** In Rayon's libraries, for instance, the different views of the same block are grouped together as a family.

<figure><img src="https://2112124689-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FngVHKyaUSSJPTFck3wkz%2Fuploads%2FuE92wBBJ6GZCf2J4SMGo%2Fblocks-family.png?alt=media" alt="A family card in My blocks, next to the family page with its In this model and Other members sections."><figcaption></figcaption></figure>

In fact, **you can create your own families**. To create a block family, simply...

* Select any block definition, and in its options, click on **`Create family`**.
* Now that a family is created, to add a new child to it, choose **`Add to family`** in the options of any other block.
* Select the family to add to.

To manage a family, use **`Set as family default`** and **`Remove from family`** in the options of its blocks, and **`Delete family`** in the options of the family. **`Display families`**, in the panel's three-dot menu, shows each family as one card. Turn it off to list every block.

### Hosted blocks <a href="#h_bc50d77b6b" id="h_bc50d77b6b"></a>

**Blocks can also be hosted in walls**.\
A hosted block uses an **insertion segment** to specify how it should get inserted into a wall.

To create a hosted block...

* **Select the elements** you want to save as a block.
* Click on the **`Block`** button (**`CMD/CTRL`** + **`B`**) in the bottom toolbar.
* **Click on the block** and then on the **`Edit`** (**`CMD/CTRL`** + **`E`**) button; now, **you will notice** **a small blue circle** in the middle of the block (this circle is its insertion point to the model).
* **Swap the insertion point for a segment**: set **`Insertion`** to **`Segment`**, in the purple edit bar or in the properties panel. The segment lands across the middle of the block: drag its two ends onto the edges of the opening, then click on **`Done`**.

That's it! Your opening block will now **snap onto Rayon walls and cut a hole in them.**

{% embed url="<https://player.vimeo.com/video/1246533734?autoplay=1&controls=0&loop=1&muted=1>" %}

<figure><img src="https://2112124689-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FngVHKyaUSSJPTFck3wkz%2Fuploads%2FbgYGWuqFjatirMiWErrB%2Fblocks-hosted-insertion.png?alt=media" alt="A door block in edit mode, with Insertion set to Segment in the purple edit bar and in the properties panel."><figcaption></figcaption></figure>

For 3D blocks, **`Insertion`** offers **`Shape`** and **`Point`**. More about 3D blocks in our page about [libraries in 3D](https://docs.rayon.design/core-concepts/work-in-3d/libraries-in-3d.md).

### Block bounding box controls <a href="#h_bc50d77b6b" id="h_bc50d77b6b"></a>

**Blocks** can have a fully functional **bounding box** that allows for non-uniform resizing from the sides and uniform resizing from the corners. In some cases, it can be useful to hide those controls, for example with parametric blocks, which have specific grips to interact with the block in the intended way only.

In the properties panel, when editing a block, under **`Box corners`**:

* You can choose to **`Show`** or **`Hide`** those controls.
* **`Auto`** will automatically hide the controls if the block is [parametric](https://docs.rayon.design/core-concepts/design/parametric-blocks.md).

<figure><img src="https://2112124689-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FngVHKyaUSSJPTFck3wkz%2Fuploads%2Fb9FjwZPmlGgEvxSbbOuz%2Fblocks-box-corners.png?alt=media" alt="The Block section of the properties panel, showing the Name, Insertion and Box corners rows."><figcaption></figcaption></figure>

***

### We are always available

Book a demo with our team, [right here](https://b1kzip68v9f.typeform.com/to/Hgr0eQ4k#source=docs).\
To get some support, reach out to us through our **in-app support chat**.\
More about [our support policy right here](https://docs.rayon.design/other-resources/others/support-policy.md).
