qsl707 发表于 2006-8-19 15:52:00

能否告诉我如何框选屏幕上的一个块,不选其他,谢谢

能否告诉我如何框选屏幕上的一个块,不选其他,谢谢

tnt1095 发表于 2006-8-19 21:20:00

<P>dim ft(0) as integer</P>
<P>dim dt(0) as variant</P>
<P>ft(0)=0</P>
<P>dt(0)="insert"</P>
<P>再用选择集选择就可以了</P>

mayuezxl 发表于 2006-8-20 22:10:00

Sub CadBlock()<BR>&nbsp;&nbsp;&nbsp; Dim tempBlock As Variant<BR>&nbsp;&nbsp;&nbsp; Dim msg As String<BR>&nbsp;&nbsp;&nbsp; Dim SsetObj As AcadSelectionSet<BR>&nbsp;&nbsp;&nbsp; Dim FilterType(0) As Integer, filterDate(0) As Variant<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; FilterType(0) = 0<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; filterDate(0) = "insert"<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp;&nbsp; Do While ThisDrawing.SelectionSets.Count &gt; 0 '=====安全创建选择集<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ThisDrawing.SelectionSets.Item(0).Delete<BR>&nbsp;&nbsp;&nbsp;&nbsp; Loop<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Set SsetObj = ThisDrawing.SelectionSets.Add("CadBlock")<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SsetObj.SelectOnScreen FilterType, filterDate<BR>&nbsp;&nbsp;&nbsp;&nbsp; For Each tempBlock In SsetObj<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; msg = tempBlock.Name<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; MsgBox msg<BR>&nbsp;&nbsp;&nbsp;&nbsp; Next tempBlock<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SsetObj.Delete<BR>End Sub

qsl707 发表于 2006-8-21 08:09:00

<P>非常感谢</P>
页: [1]
查看完整版本: 能否告诉我如何框选屏幕上的一个块,不选其他,谢谢