Here is what I wrote in C# - it highlight the top block but not the nested one, but return the ent (nested) - HTH
[CommandMethod("TESTSELNEST")]
public void testselnest()
{
Document doc = acadApp.DocumentManager.MdiActiveDocument;
Editor ed = doc.Editor;
Database db = doc.Database;
PromptEntityResult res = ed.GetEntity("\nSelect a nest object: ");
if (res.Status != PromptStatus.OK) return;
using (Transaction tr = db.TransactionManager.StartTransaction())
{
ObjectId objId = res.ObjectId;
AcEd.PromptNestedEntityOptions neOpts = new AcEd.PromptNestedEntityOptions("");
neOpts.UseNonInteractivePickPoint = true;
neOpts.NonInteractivePickPoint = res.PickedPoint;
AcEd.PromptNestedEntityResult neRes = ed.GetNestedEntity(neOpts);
if (neRes.Status == AcEd.PromptStatus.OK) objId = neRes.ObjectId;
AcDb.Entity ent = (AcDb.Entity)tr.GetObject(objId, AcDb.OpenMode.ForWrite);
ObjectId[] objs = neRes.GetContainers();
foreach (ObjectId id in objs)
{
DBObject obj = tr.GetObject(id, OpenMode.ForWrite);
Entity tmpEnt = (Entity)tr.GetObject(id, OpenMode.ForRead);
ObjectId[] ids = new ObjectId[1];
ids[0] = id;
SubentityId index = new SubentityId(SubentityType.Null, 0);
FullSubentityPath path = new FullSubentityPath(ids, index);
tmpEnt.Highlight(path, true);
}
tr.Commit();
}
}
BTW, I do not know why not posting any CODE at all...