Hi
This issue seems to be related to removing "Susan" definition. Please refer the following code, in this If I remove the code, which erases Susan, then the temp_group creation is success else it return ComponentInstance.
And also, I get this error only when I put this code in a rb file and put in "Plugin" directory , if I save the rb file in some other directory and load that file from Ruby console, I don't face this issue.
` component_list = Sketchup.active_model.definitions
cm = component_list["Susan"]
if(cm != nil && cm.count_instances > 0)
If I comment out following line, it works
cm.instances.each { | entity | entity.erase! }
end
entity_list = Sketchup.active_model.entities
temp_group = entity_list.add_group
UI.messagebox("temp_group class: #{temp_group.class}\n")
temp_entity_list = temp_group.entities`
Thanks
rknmag