# Room2Ds by Attribute

![](/files/-Mihr_bjG0EUHBjRmRW8)

![](/files/-Mihr_bk4KxmR5emko9W) - [\[source code\]](https://github.com/ladybug-tools/dragonfly-grasshopper/blob/master/dragonfly_grasshopper/src//DF%20Room2Ds%20by%20Attribute.py)

Separate and group dragonfly Room2Ds by any attribute that the room possesses.

This can be used to group Room2Ds by program, whether rooms are conditioned, etc.

## Inputs

* **df\_obj \[Required]**

  A Dragonfly Model, Building, Story or Room2D to be separated and grouped based on room attributes.&#x20;
* **attribute \[Required]**

  Text for the name of the Room2D attribute by which the Room2Ds should be separated. The "DF Room2D Attributes" component lists all of the attributes of the Room2D.&#x20;

## Outputs

* **values**

  A list of values with one attribute value for each branch of the output rooms.&#x20;
* **room2ds**

  A data tree of honeybee rooms with each branch of the tree representing a different attribute value.&#x20;


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.ladybug.tools/dragonfly-primer/components/1_visualize/room2ds_by_attribute.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
