清除图形
public void purge(){#region 清空图形
PromptSelectionResult psr = ed.SelectAll();
SelectionSet ss = psr.Value;
ObjectIdCollection idcs1 = new ObjectIdCollection(ss.GetObjectIds());
ObjectIdCollection idcs2 = new ObjectIdCollection();
using (Transaction trans = db.TransactionManager.StartTransaction())
{
foreach (ObjectId id in idcs1)
{
id.Erase();
}
db.Purge(idcs1);
trans.Commit();
}
#endregion
} 哪位高手给help一下呀
页:
[1]