PLEASE post your code according Instruktion here:
How to post code correctly in the forum:
[How to] Post correctly formatted and colorized code on the forum?
Well. There is a typo in my code above, group2 asgined twice… sorry, I did not tested it yesterday
.
the proper one should be:
entities = Sketchup.active_model.entities
dc = entities[0]
dc = dc.make_unique
dc_ents = dc.definition.entities.to_a
group1 = dc_ents[0]
group2 = dc_ents[1]
group3 = dc_ents[2]
t11 = group1.outer_shell(group2).outer_shell(group3)
dc.explode

Be aware that this snippet is handling the special case where there is nothing else in a model, just a component containing, 3 solid groups/component.
Post your model you are trying on, if you still heve an issue.