def ithil_hide_solid
	model = Sketchup.active_model
	selection = model.selection
	selection = model.active_entities if selection.empty?
	model.start_operation ("Hide Solid")
    selection.each do |item| 
  if (item.typename == "Group") or (item.typename == "ComponentInstance")
                if (item.respond_to?(:volume))
                     item.hidden=true if item.volume != -1
                end 
   end # if
  end # do
  	model.commit_operation
  end
 
if( $submenu )
	organizer = $submenu 
	if !file_loaded?(__FILE__) then
		organizer.add_item("Hide Solid") { ithil_hide_solid }
	end
else
	if !file_loaded?('ithil_menu_loader') then
		$ithil_menu = UI.menu("Plugins").add_submenu("Ithil Tools")
	end
	if !file_loaded?(__FILE__) then
		$ithil_menu.add_item("Hide Solid") { ithil_hide_solid }
	end
end

file_loaded('ithil_menu_loader')
file_loaded(__FILE__)
