vbKeyReturn?

Discussion in 'AutoCAD' started by joeynich, Aug 8, 2003.

  1. joeynich

    joeynich Guest

    HELP! My program starts with getting a size from a user on a user form. Then after the user presses ok it goes to the AutoCAD command prompt asking the user to select a line. I have a loop statement running so that the user can select as many lines as the want. When they select the lines it double lines the lines. I would like the user to be able to press enter when done with selecting. Can anyone help?

    Joe Nichols
     
    joeynich, Aug 8, 2003
    #1
  2. joeynich

    joeynich Guest

    I'm not sure I know what you mean. Can you give me an example?
     
    joeynich, Aug 8, 2003
    #2
  3. I assume you're using GetEntity within your Do loop. Here's one way to make
    it exit-able.

    On Error Resume Next
    Do
    ThisDrawing.Utility.GetEntity ...
    If Err <> 0 Then
    Err.Clear
    Exit Do
    End if
    ' code to double the selected line goes here
    Loop
    On Error Goto 0


    If you'd rather select all the lines at once, using windows, etc, and THEN
    have the lines get doubled after you hit ENTER, Google this newsgroup for
    SelectOnScreen.

    http://groups.google.com

    Or type it into the VBA editor and hit F1 to see an example

    Good luck,
    James
     
    James Belshan, Aug 8, 2003
    #3
  4. joeynich

    joeynich Guest

    The "If Err&lt;&gt;0 Then" worked great! Thank you very much.
     
    joeynich, Aug 8, 2003
    #4
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Similar Threads
There are no similar threads yet.
Loading...