能否告诉我如何框选屏幕上的一个块,不选其他,谢谢
能否告诉我如何框选屏幕上的一个块,不选其他,谢谢 <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> Sub CadBlock()<BR> Dim tempBlock As Variant<BR> Dim msg As String<BR> Dim SsetObj As AcadSelectionSet<BR> Dim FilterType(0) As Integer, filterDate(0) As Variant<BR> <BR> FilterType(0) = 0<BR> filterDate(0) = "insert"<BR> <BR> Do While ThisDrawing.SelectionSets.Count > 0 '=====安全创建选择集<BR> ThisDrawing.SelectionSets.Item(0).Delete<BR> Loop<BR> Set SsetObj = ThisDrawing.SelectionSets.Add("CadBlock")<BR> SsetObj.SelectOnScreen FilterType, filterDate<BR> For Each tempBlock In SsetObj<BR> msg = tempBlock.Name<BR> MsgBox msg<BR> Next tempBlock<BR> SsetObj.Delete<BR>End Sub <P>非常感谢</P>
页:
[1]