hnge 发表于 2005-6-6 11:17:00

用getentity选择实体时如何判断实体已经选择完了

在一个图形文档中,想用utity.getentity entobj,pntpic 选择实体加入到一选择集中,但不知道该如何判断实体已经被选择完毕了,请高手赐教,谢谢

王咣生 发表于 2005-6-6 11:47:00

' Begin the selection
                       Dim returnObj As AcadObject
                       Dim basePnt As Variant
                       
                       On Error Resume Next
                       
                       ' The following example waits for a selection from the user
                       ThisDrawing.Utility.GetEntity returnObj, basePnt, "Select an object"
                       
                       If Err0 Then
                                                       Err.Clear
                                                       MsgBox "Program ended.", , "GetEntity Example"
                                                       Exit Sub
                       Else
                                                       returnObj.Update
                                                       MsgBox "The object type is: " & returnObj.EntityName, , "GetEntity Example"
                                                       returnObj.Update
                       End If
当正确选择实体后,Err是为0的,由此判断.

雪山飞狐_lzh 发表于 2005-6-6 20:30:00

为什么不用SelectOnScreen方法?
页: [1]
查看完整版本: 用getentity选择实体时如何判断实体已经选择完了