本人想请教一个只选择圆的方法,下面画绿线处就是
但运行出错,如大师明白为什么错,请多多指教
Public Sub c(layerr As String)
Dim ssetobj1 As AcadSelectionSet Dim icount1 As Integer icount1 = ThisDrawing.SelectionSets.Count While (icount1 > 0) If ThisDrawing.SelectionSets.Item(icount1 - 1).Name = "yuan" Then ThisDrawing.SelectionSets.Item(icount1 - 1).Delete End If icount1 = icount1 - 1 Wend Set ssetobj1 = ThisDrawing.SelectionSets.Add("yuan") ThisDrawing.Utility.Prompt "please select object"
dim filtertype as integer
dim filterdata as string
filtertype = 0
filterdata=" circle " ssetobj1.SelectOnScreen filtertype,filterdata Dim i1 As Integer Dim selobj1 As Acadcircle For i1 = 0 To ssetobj1.Count - 1 Set selobj1 = ssetobj1.Item(i1) Next End Sub
|