# encoding: UTF-8
m = Sketchup.active_model
tgt = m.entities.grep(Sketchup::Group).select { |g| g.name.to_s.start_with?("SWD_02_jog30_6T_") || g.name.to_s.start_with?("SWD_03_jog20_6T_") }
puts "삭제 #{tgt.length}개: #{tgt.map { |g| g.name }.inspect}"
unless tgt.empty?
  m.start_operation("재작업 전 삭제", true)
  tgt.each { |g| g.erase! }
  m.commit_operation
end
puts "완료"
"DELB2"
