Consulting

Results 1 to 3 of 3

Thread: ACAD: GetPoint is driving me nuts

  1. #1

    ACAD: GetPoint is driving me nuts

    I'm starting with ACAD VBA, and made a small proggram to get images from a web server (map server) and place them in my drawing.

    I'm having some probnlems with the GetPoint function, It isn't working as expected and sends me a nice error message "Error in method GetPoint in object IAcadUtility2"

    Here's the code:

    [VBA]
    Dim basePntX as Variant

    basePntX = ThisDrawing.Utility.GetPoint(, "Select lower left corner")
    Me.txtX = basePntX(0)
    Me.txtY = basePntX(1)
    [/VBA]

    Curiously, if I Debug the error and re-run that GetPoint line, It works as expected.

    What I'm doing wrong ??

    PS: If needed I can send the complete code by e.mail

  2. #2
    Moderator VBAX Master Tommy's Avatar
    Joined
    May 2004
    Location
    Houston, TX
    Posts
    1,184
    Location
    Hi stigma,
    you have to hide the form before doing a getpoint. The revised code below should fix your problem

    [VBA]
    Dim basePntX As Variant
    Me.hide
    basePntX = ThisDrawing.Utility.GetPoint(, "Select lower left corner")
    Me.txtX = basePntX(0)
    Me.txtY = basePntX(1)
    Me.Show
    [/VBA]

  3. #3
    Hey ! Thanks a lot !

    My forehead thanks you too

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •