- 积分
- 12459
- 明经币
- 个
- 注册时间
- 2003-5-28
- 在线时间
- 小时
- 威望
-
- 金钱
- 个
- 贡献
-
- 激情
-
|
发表于 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 Err <> 0 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的,由此判断. |
|