Thanks for your answer.
but no error occurs here while running the sample sub i posted
when dose error occur, for confusing AcadEntity with Acadobject
thanks a lot
-------------------------------------
"MP" wrote in message
news:5235386@discussion.autodesk.com...
No reason as far as I'm concerned
I always use AcadEntity then check for
If TypeOf oEnt is DesiredType Then
DoSomethingWith oEnt
End if
also instead of On Error Resume Next you might consider something like the
following
PickSomething: 'line label so we can return if we missed the object
On Error GoTo MissedPick '(or whatever label you prefer)
ThisDrawing.Utility.GetEntity oEnt, basePnt, "Select an
object"
On Error GoTo 0 'reset error handling for rest of routine
'rest of routine here ....
'then exit section
ExitHere:
'do whatever cleanup...etc
Exit Sub/Funciton
'error section after normal exit
'error lable later in program
MissedPick:
If UserEscaped Then 'assuming you have a user escaped function to test
escape key press
'do whatever..probably
GoTo ExitHere
Else
'do something else
'maybe user just missed the pick and wants to retry
GoTo PickSomething
End if
End Sub/Function
just my 2c
more than you asked but what the heck...
:-)
"youngman" wrote in message
news:5235363@discussion.autodesk.com...
hi,
here is the example from acad vba help,
Dim returnObj As AcadObject Dim basePnt As Variant On Error
Resume Next ' The following example waits for a selection from the
userRETRY: ThisDrawing.Utility.GetEntity returnObj, basePnt, "Select an
object" -------------------------------------------------------------------w
hy not Dim returnObj As Acadentity,thanks