nicklos 发表于 2006-5-10 12:55:00

能帮着看看有关提取层信息的吗?

<P>static public void test() // This method can have any name<BR>&nbsp;&nbsp;{ <BR>&nbsp;&nbsp; Editor ed = Application.DocumentManager.MdiActiveDocument.Editor;&nbsp; ;<BR>&nbsp;&nbsp;&nbsp;TypedValue[] filList = new TypedValue[]<BR>&nbsp;&nbsp;&nbsp;{ new TypedValue(0,"PolyLine"),new TypedValue((int)DxfCode.LayerName, "地质点") };<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SelectionFilter filter = new SelectionFilter(filList);&nbsp; <BR>&nbsp;&nbsp; PromptSelectionResult res = ed.GetSelection( filter); <BR>&nbsp;&nbsp; if (res.Status != PromptStatus.OK) <BR>&nbsp;&nbsp;&nbsp;&nbsp;return; <BR>&nbsp;&nbsp;&nbsp;Autodesk.AutoCAD.EditorInput.SelectionSet SS = res.Value; <BR>&nbsp;&nbsp;&nbsp;ObjectId[] idArray; <BR>&nbsp;&nbsp;&nbsp;idArray = SS.GetObjectIds(); <BR>&nbsp;&nbsp;&nbsp;foreach (ObjectId employeeId in idArray) <BR>&nbsp;&nbsp;&nbsp;{ed.WriteMessage(employeeId.ToString()); </P>
<P>&nbsp;&nbsp;&nbsp;}</P>
页: [1]
查看完整版本: 能帮着看看有关提取层信息的吗?