如何删除图上所有图片?
C#开发|冯美娟|2019-03-01 09:45
-
回答:
MxDrawSelectionSet ss = new MxDrawSelectionSet(); // 创建过滤对象. MxDrawResbuf spFilte = new MxDrawResbuf(); // 把文字对象,当着过滤条件. spFilte.AddStringEx("IMAGE", 5020); // 得到图上,所有图片对象. ss.Select2(MCAD_McSelect.mcSelectionSetAll, null, null, null, spFilte); bool bFind = false; for (int i = 0; i < ss.Count; i++) { MxDrawEntity ent = ss.Item(i); if (ent == null) continue; ent.Erase(); }