# Convert component to group

**URL:** <https://forums.sketchup.com/t/convert-component-to-group/32304>\
**Category:** Ruby API\
**Created:** [October 17, 2016, 1:48pm UTC](https://forums.sketchup.com/t/convert-component-to-group/32304 "2016-10-17T13:48:02Z")\
**Posts on this page:** 1\
**Showing post:** 19

<div class="post-metadata">

**Author:** ![DanRathbun](https://sea2.discourse-cdn.com/sketchup/user_avatar/forums.sketchup.com/danrathbun/32/500_2.png) [@DanRathbun](https://forums.sketchup.com/u/DanRathbun)\
**Post date:** [October 18, 2016, 3:50pm UTC](https://forums.sketchup.com/t/convert-component-to-group/32304/19 "2016-10-18T15:50:13Z")

</div>

Yes it would be so much simpler if the API had a **`to_group()`** instance method of the **`ComponentDefinition`** class, that would convert it to a group definition without all this rigmarole and exploding. All the definition’s instances then would become group instances, and there’d be no need to copy attribute dictionaries and native properties.

---

_[View the full topic](https://forums.sketchup.com/t/convert-component-to-group/32304)._
