Adding custom text to command Prompt.

Discussion in 'AutoCAD' started by srinivasan, Mar 16, 2005.

  1. srinivasan

    srinivasan Guest

    Dear all

    I like to send some text back to the command Prompt.
    For example i am getting a point using get point and second point using the same get point method,so that the command prompt looks like

    command: Select start point:
    command: Select End point:

    Now what i require is to calculate the distance and put the distance back to the command prompt like this,

    command: Select start point:
    command: Select End point:"distance 50"

    I tried with prompt but it displays in the next line.
    command: Select start point:
    command: Select End point
    :"distance 50"

    Can the string be appended to the existing command line.

    Thanks in advance.
    Regards
    Sri
     
    srinivasan, Mar 16, 2005
    #1
  2. srinivasan

    viswanathan Guest

    Hi,

    Try with this code.

    Sub Ch4_GetStringFromUser()
    Dim retVal As String
    retVal = ThisDrawing.Utility.GetString(1, vbCrLf & "Enter your name: ")
    Dim retVal1 As String
    retVal1 = ThisDrawing.Utility.GetString(1, "Select End point:distance 50")
    End Sub

    viswanathan.s
     
    viswanathan, Mar 17, 2005
    #2
  3. srinivasan

    srinivasan Guest

    thanks

    but this not what i am looking for.
    Here it is only a prompt message we are sending.
    But iwhat i am looking is to change the previous
    prompt messge.

    regards
    Sri
     
    srinivasan, Mar 17, 2005
    #3
  4. hi

    when the user made the endpoint-click autocad sends a CrLf to the textline, so the current line is lost for access, because autocad switched to the
    next line (except when the user inputs coordiantes via keyboard and finished the input with <space>).

    with ThisDrawing.Utility.Prompt you have only the choice of making output to the current-textline (inkluding chr(08) for <backspace>).

    - alfred -
     
    Alfred NESWADBA, Mar 17, 2005
    #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.