Results 1 to 5 of 5

Thread: PromptPointOptions Question

  1. #1
    All AUGI, all the time
    Join Date
    2003-10
    Posts
    688

    Default PromptPointOptions Question

    Everything works great as far as prompting the user and getting the point but how do you get the command line to clear after the user picks a point or does what you're asking them to do? If you run the same command without clearing the command line, the same prompt shows up after the first prompt, and so on, and so on. See below...

    Pick point on screen:Pick point on screen:Pick point on screen:

    How do Io clear this and go to a fresh command line "Command:"?

  2. #2
    Administrator RobertB's Avatar
    Join Date
    2001-08
    Location
    Dallas TX USA
    Posts
    5,825

    Default Re: PromptPointOptions Question

    What does your prompt string look like? In the code.
    R. Robert Bell
    Design Technology Manager
    S P A R L I N G
    Opinions expressed are mine alone and do not reflect the views of Sparling.

  3. #3
    AUGI Addict sinc's Avatar
    Join Date
    2004-02
    Location
    Colorado
    Posts
    1,986

    Default Re: PromptPointOptions Question

    It won't go to the Command prompt until the current command is done executing, i.e. when your routine exits.

    If you don't want consecutive prompts to be on the same line, include a newline in the prompt. I usually like to put it on the leading edge of strings. For example, change the prompt string to "\nPick point on screen:" instead of "Pick point on screen:"

  4. #4
    All AUGI, all the time
    Join Date
    2003-10
    Posts
    688

    Default Re: PromptPointOptions Question

    I didn't know that the new line character could be used in VB.net. I always used it in Lisp and thought it was specific to that. If that works it'll take care of the multiple prompts in the program but I still need to resolve the issue of going back to the command line "Command:" after the program is done.

    The program is simple. It basically prompts the user for an insertion point for a new piece of Mtext and then if the promptpoint.status is OK it then inserts the new Mtext into the drawing. After that it just sits and looks at me with the "Pick Insertion Point..." prompt still at the command line and no "Command:" ready for the next one. You can however type a new command after all of this and it still works. This is what the command line looks like when you type LINE after my mtext program inserts the mtext:

    Command: Pick Insertion Point For New Mtext: LINE

    After hitting enter to run the LINE command, all is well.

    Ideas?

  5. #5
    All AUGI, all the time
    Join Date
    2003-10
    Posts
    688

    Default Re: PromptPointOptions Question

    A registered command method defeats the purpose of my program(s) because they all rely on selecting things from a modeless dialog. I have tried and noticed that when you run the code inside a command method, it automatically returns back to the command line.

    I found a way around all of this though. After my program stops prompting the user and does all of its "stuff" on screen, I simply use a SendStringToExecute() to send the command "REDRAW" to the command line which Redraws the screen (basically does nothing except wipe out the old-school "blips") and then returns back to the AutoCAD Command: line. I specifically did not use REGEN just in case there was a giant file loaded or something else to bog it down. I put this into my program last night and it works great.

Similar Threads

  1. yet another pdf question
    By whittendesigns in forum AutoCAD General
    Replies: 4
    Last Post: 2008-08-04, 11:41 AM
  2. OLD MNU question
    By CADMama in forum AutoCAD Customization
    Replies: 5
    Last Post: 2007-09-19, 09:04 PM

Posting Permissions

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