过滤选择的方法请教
<P><FONT color=#f76809>本人想请教一个只选择圆的方法,下面画绿线处就是</FONT></P><P><FONT color=#f76809>但运行出错,如大师明白为什么错,请多多指教</FONT></P>
<P>Public Sub c(layerr As String) </P>
<P>Dim ssetobj1 As AcadSelectionSet<BR>Dim icount1 As Integer<BR>icount1 = ThisDrawing.SelectionSets.Count<BR>While (icount1 > 0)<BR> If ThisDrawing.SelectionSets.Item(icount1 - 1).Name = "yuan" Then<BR> ThisDrawing.SelectionSets.Item(icount1 - 1).Delete<BR> End If<BR> icount1 = icount1 - 1<BR> Wend<BR> Set ssetobj1 = ThisDrawing.SelectionSets.Add("yuan")<BR> ThisDrawing.Utility.Prompt "please select object"</P>
<P> <FONT color=#dd4822> </FONT><FONT color=#09f709> dim filtertype as integer</FONT></P>
<P><FONT color=#09f709> dim filterdata as string</FONT></P>
<P><FONT color=#09f709> filtertype = 0</FONT></P>
<P><FONT color=#dd4822><FONT color=#09f709> filterdata=" circle "<BR> ssetobj1.SelectOnScreen filtertype,filterdata</FONT><BR></FONT> Dim i1 As Integer<BR> Dim selobj1 As Acadcircle<BR> For i1 = 0 To ssetobj1.Count - 1<BR> Set selobj1 = ssetobj1.Item(i1)<BR> <BR> Next<BR> End Sub<BR></P> <P><FONT color=#ff0000>参考一下下面的函数就知道了</FONT></P>
<P><FONT color=#09f709><A href="http://www.mccad.net/function/list.asp?id=288&ordertype=byletter" target="_blank" >http://www.mccad.net/function/list.asp?id=288&ordertype=byletter</A></FONT></P> <P>过滤类型和数据要用数组,不是一个单一的字符串。。。。</P>
页:
[1]