---
title: getStoreys
slug: viewer-2d/methods/getStoreys
docTags: 
createdAt: 2024-02-21T14:33:53.989Z
---

Returns the list of storeys.

:::hint{type="info"}
By default returns storeys for the active building if applicable otherwise returns all storeys.
:::

## Example

::codepen{url="https://codepen.io/Catenda/embed/KKjZVoQ"}

## Usage

```javascript
const options = {
  all: true
};

const storeys = viewer2d.getStoreys(options);
```

## Parameters

### options

Options for getting storeys.

| **Type** | **Required** |
| -------- | ------------ |
| Object   | No           |

**Properties**

| **Name**     | **Type** | **Required** | **Description**                            |
| ------------ | -------- | ------------ | ------------------------------------------ |
| `all`        | Boolean  | No           | Get storeys from all models                |
| `buildingId` | String   | No           | Get storeys for a specific building        |
| `visible`    | Boolean  | No           | Don't include storeys that are not visible |

## Return Value

List of storeys.

| **Type**                                       |
| ---------------------------------------------- |
| Array\[[Storey](docId\:aHKrYEVRXewGgDDVv9pWM)] |

### Example

```javascript
[
  {
    id: "398045822938",
    buildingId: "0.rp9o1l6sjl",
    guid: "3eM8WbY_52KK5TDWs3wwJP",
    name: "First Floor",
    modelId: "0.vo5te5rrto",
    elevation: 1.0
  },
  {
    id: "398065292939",
    buildingId: "0.rp9o1f7sjl",
    guid: "3eM8WbY_53DD6TDWs3wwJN",
    name: "Second Floor",
    modelId: "0.vo53l54rto",
    elevation: 5.0
  }
];
```

