如何选择刚生成的图元
<p>各位大侠:</p><p>AUTOLISP中是用EntLast()来选择刚生产的图元,请问VBA中怎样实现。谢谢!!!</p> 返回当前模型空间中最后一个实体方法一<br/><br/> Dim InsertBlock As Object<br/> <br/> Set InsertBlock = ThisDrawing.ModelSpace.Item(ThisDrawing.ModelSpace.Count - 1)<br/><br/><br/> ' 返回当前模型空间中最后一个实体方法二<br/><br/> Dim SSet As OBJECT<br/> Dim InsertBlock As OBJECT<br/> <br/> On Error Resume Next<br/> <br/> Set SSet = ThisDrawing.SelectionSets("ss")<br/> If Err Then Set SSet = ThisDrawing.SelectionSets.Add("ss")<br/> SSet.Select acSelectionSetLast '注意这里 acSelectionSetLast !!<br/> Set InsertBlock = SSet.Item(0)<br/> <br/> Set SSet = Nothing<br/> ThisDrawing.SelectionSets("ss").Delete<br/><br/> <p>谢谢 大侠的帮组 向你致敬</p><p></p>
页:
[1]