GetSelection选择多段线失效
过滤器写的有问题¶
对象名称不能只填写PolyLine
,加上一个通配符*
即可解决。即*Polyline
如下,交互选择,过滤掉其它类型,只能选择直线或者多段线:
var filter = new SelectionFilter(new TypedValue[]
{
new TypedValue((int)DxfCode.Operator,"<OR"),
new TypedValue((int)DxfCode.Start,"Line"),
new TypedValue((int)DxfCode.Start,"*PolyLine"),
new TypedValue((int)DxfCode.Operator,"OR>"),
});
var pEntRes = ACadApp.Editor.GetSelection(psOpt, filter);