Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

This Drawing.Utility.GetPoint run-time error - VBA.

Status
Not open for further replies.

basepointdesignz

Programmer
Jul 23, 2002
566
GB
Hey Guys,

Using the ThisDrawing.Utility.GetPoint statement, I can get the user to enter or select a point - this works fine. The only trouble is that if the user tries to zoom, pan or choose any snap method, an error occurs:

Run-time error: '2147352567 (80020009)
Method 'GetPoint' of object 'IAcadUtility' failed.


Does any one know how to get around this so that the user can use these invisible commands to navigate the drawing/or snap to a point, while the GetPoint function is running..

Thanks in advance..

Renegade..
 
You will need to trap the error. Here is a quick example:
Code:
    On Error Resume Next
TryAgain:
    pt = ThisDrawing.Utility.GetPoint(, "Pick the Point: ")
    If Err.Number <> 0 Then
        Err.Clear
        GoTo TryAgain
    End If
    On Error Goto ErrHndlr
 
Hey dsi,

Thanks for the help mate. That's just what I was after..

Cheers,

Renegade..
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top