**I made some tests with EntityObserver and EntitiesObserver classes and it looks like onEraseEntities method doesn't work, or I don't know how to use it?
I tried the same thing with onEraseEntity and it works.
This didn't worked. Nothing happens
class MyEntitiesObserver < Sketchup;;EntitiesObserver
def onEraseEntities(entities)
puts "Erased; " + entities.to_s
end
end
begin
x = 0
Sketchup.active_model.entities.each do |e|
e.add_observer(MyEntitiesObserver.new)
x += 1
end
puts 'Observer was added to ' + x.to_s + ' elements.'
end
This told me what I wanted to see:
class MyEntityObserver < Sketchup;;EntityObserver
def onEraseEntity(ent)
puts "Erased; " + ent.to_s
end
end
begin
x = 0
Sketchup.active_model.entities.each do |e|
e.add_observer(MyEntityObserver.new)
x += 1
end
puts 'Observer was added to ' + x.to_s + ' elements.'
end
```**