请问如何设置选择过滤,请看这段代码的问题。
Editor ed = Autodesk..ApplicationServices.Application.DocumentManager.MdiActiveDocument.Editor;Autodesk.AutoCAD.DatabaseServices.TypedValue[] tv = new TypedValue;
tv=new TypedValue(0,"POLYLINE");
Autodesk.AutoCAD.EditorInput.SelectionFilter sf = new SelectionFilter(tv);
 romptSelectionOptions opts =new PromptSelectionOptions();
opts.AllowDuplicates = true;
opts.MessageForAdding="请选择一条等高线:";
 romptSelectionResultres = ed.GetSelection(opts,sf);
if(res.Status!=PromptStatus.OK)
return;
Autodesk.AutoCAD.EditorInput.SelectionSet ss = res.Value;
ObjectId[] oids = ss.GetObjectIds();
for(int i=0;i
以上代码想实现只选择多段线,但是却选不到多段线。是什么问题呢??
你的等高线是否 “拟合”过,如果拟合过应该可以。
如果没有拟合过,那么就是lwpolyline: tv=new TypedValue(0,"LWPOLYLINE");轻多义线
页:
[1]