交互工具中框选后怎样筛选需要类型的element

框选我现在是没问题的,只是我想特定选中一类元素,比如管线,不知道如何对结果集筛选,看到文档说通过重写 FilterAgendaEntries,但是我里面设置不需要的元素Invalidate,但是无效,好像得到的只是个副本,如下:

 protected override bool FilterAgendaEntries() 
 { 
 bool changed = false; 
 for (uint i = 0; i < ElementAgenda.GetCount(); i++)
 { 
 Bentley.DgnPlatformNET.Elements.Element ele = ElementAgenda.GetEntry(i); 
 IDgnECInstance ec = ToolsUtils.GetECInstanceByClassName(ConstValues.PIPE, ele); 
 if (ec == null) { ele.Invalidate(); changed = true; } } 
 return changed; } 

然后又看到有地方说重写 ModifyAgendaEntries 这个方法,但是怎么操作ElementAgenda这个集合呢,没有看到remove类似的方法啊?应该如何做呢?