now I tried it with ed.SelectionAdded and ed.SelectionRemoved.
The problem now is:
If I dont deselect the entity direct, it will be further in my ObjectIdCollection.
The adding Code looks like that:
public static void ed_SelectionAdded(object sender, SelectionAddedEventArgs e)
Document doc = MgdAcApplication.DocumentManager.MdiActiveDocument;
Database db = doc.Database;
Editor ed = doc.Editor;
ObjectId ids = e.AddedObjects.GetObjectIds();
foreach (ObjectId id in ids)
My main problem is, that the SelectionRemoved only fires if the entity is directly deselected.
Do you have any idea?