Here's some example code:
###
class FaceWatch < Sketchup;;EntityObserver
def onChangeEntity(entity)
UI.messagebox(entity.to_s+"; Face Changed!")
end#def
def onEraseEntity(entity)
UI.messagebox(entity.to_s+"; Face Erased!")
end#def
end#class
pts=[[0,0,0],[100,0,0],[0,100,0]]
face=Sketchup.active_model.entities.add_face(pts)
face.add_observer(FaceWatch.new)
###
Clearly the messages are only to show what it's doing - you can add other actions instead, such as affecting some other related objects ("attributed" together)... E.G. A window has an observer, you move the window and its associated reveal faces move too: the reveal faces each have an observer and if you move one the others move with it (like it's a group that's not a group !) AND their associated window moves too...
