# Group inconsistency between 2016 and 2017

**URL:** <https://forums.sketchup.com/t/group-inconsistency-between-2016-and-2017/35338>\
**Category:** Ruby API\
**Created:** [December 7, 2016, 6:24pm UTC](https://forums.sketchup.com/t/group-inconsistency-between-2016-and-2017/35338 "2016-12-07T18:24:18Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![alexschreyer](https://sea2.discourse-cdn.com/sketchup/user_avatar/forums.sketchup.com/alexschreyer/32/380_2.png) [@alexschreyer](https://forums.sketchup.com/u/alexschreyer)\
**Post date:** [December 7, 2016, 6:24pm UTC](https://forums.sketchup.com/t/group-inconsistency-between-2016-and-2017/35338/1 "2016-12-07T18:24:18Z")

</div>

I ran into an odd bug/issue with my unfold extension in 2017. With some faces selected, try the following code in 2016 and 2017:

```
mod = Sketchup.active_model # Open model
ent = mod.entities # All entities in model
sel = mod.selection # Current selection
f = Array.new
sel.each {|e|
  f.push(e) if e.is_a? Sketchup::Face
}
p f
g = ent.add_group( f )
g.explode
p f

```

This basically creates an array of faces, groups it and explodes the group. In 2016 the last reference to the array yields the original faces, in 2017 it yields “deleted entities”. Is this part of the “unique ID” changes and should this be expected or is it a bug?

---

<div class="post-metadata">

**Author:** ![john\_drivenupthewall](https://avatars.discourse-cdn.com/v4/letter/j/c67d28/32.png) [@john\_drivenupthewall](https://forums.sketchup.com/u/john_drivenupthewall)\
**Post date:** [December 7, 2016, 6:32pm UTC](https://forums.sketchup.com/t/group-inconsistency-between-2016-and-2017/35338/2 "2016-12-07T18:32:27Z")

</div>

it’s expected, and catches out a lot of old code…

there are other posts here and at SCF talking about this issue…

john

---

<div class="post-metadata">

**Author:** ![alexschreyer](https://sea2.discourse-cdn.com/sketchup/user_avatar/forums.sketchup.com/alexschreyer/32/380_2.png) [@alexschreyer](https://forums.sketchup.com/u/alexschreyer)\
**Post date:** [December 7, 2016, 6:36pm UTC](https://forums.sketchup.com/t/group-inconsistency-between-2016-and-2017/35338/3 "2016-12-07T18:36:11Z")

</div>

I see. I’ll look those up. Thanks!
