i wrap the function with try{} catch{}
then, if i just want to select one
ObjectId[] ids = e.AddedObjects.GetObjectIds();
if (e.AddedObjects.Count == 1)
{
ObjectId objid = ids[0];
Entity ename = (Entity)tr.GetObject(objid, OpenMode.ForRead);
BlockReference br = (BlockReference)ename;
if (ename is BlockReference)
{
MessageBox.Show("Is one BLOCK...", "Found", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
e.Remove(0);
}
e.Remove(0);
tr.Commit();