用getentity选择实体时如何判断实体已经选择完了
在一个图形文档中,想用utity.getentity entobj,pntpic 选择实体加入到一选择集中,但不知道该如何判断实体已经被选择完毕了,请高手赐教,谢谢 ' Begin the selection<BR> Dim returnObj As AcadObject<BR> Dim basePnt As Variant<BR> <BR> On Error Resume Next<BR> <BR> ' The following example waits for a selection from the userThisDrawing.Utility.GetEntity returnObj, basePnt, "Select an object"<BR> <BR> If <FONT color=#ff0000>Err</FONT> <> 0 Then<BR> Err.Clear<BR> MsgBox "Program ended.", , "GetEntity Example"<BR> Exit Sub<BR> Else<BR> returnObj.Update<BR> MsgBox "The object type is: " & returnObj.EntityName, , "GetEntity Example"<BR> returnObj.Update<BR> End If
当正确选择实体后,Err是为0的,由此判断. 为什么不用SelectOnScreen方法?
页:
[1]