Message 1 of 3
Not applicable
05-26-2016
09:29 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
when I clicke the entity in dwg, I want to get that entity infomation, like a image.
So, I was using the event in Editor.
Editor ed = doc.Editor;
ed.PromptedForSelection += edPromptForSelection;
private void edPromptForSelection(object sender, PromptSelectionResultEventArgs e)
{
Editor ed = sender as Editor;
PromptSelectionResult psr = e.Result;
if (psr.Status != PromptStatus.OK) return;
ObjectId[] objArr = psr.Value.GetObjectIds();
// 레이어를 생성하고, 점만 출력한다.
using (docLock = doc.LockDocument())
{
using (tr = db.TransactionManager.StartTransaction())
{
foreach (ObjectId Id in objArr)
{
Entity ent = tr.GetObject(Id, OpenMode.ForRead) as Entity;
}
}
}
ed.SetImpliedSelection(objArr);
}
It was working what I thought but Called the Event many times.... maybe 4?
I just want to call one by one clicked.
so, To release or Clear the selection list,
I used the
ed.SetImpliedSelection(objArr);
But It cannot fix the problem.
Solved! Go to Solution.