# Room2Ds by Attribute

![](https://3405893330-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Ma9gBkJelXEQ5LsYEl7%2Fuploads%2Fgit-blob-5e44b08dc0f7d83059ad21dc36e30b1d935dfc2e%2FRoom2Ds_by_Attribute.png?alt=media)

![](https://3405893330-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Ma9gBkJelXEQ5LsYEl7%2Fuploads%2Fgit-blob-61c7dbd2ff7b72317dc1d61de4dd650e6c4e3a28%2FRoom2Ds_by_Attribute.png?alt=media) - [\[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;
