Length limit attribute?

Discussion in 'AutoCAD' started by BillZ, May 5, 2004.

  1. BillZ

    BillZ Guest

    R2005 Vlisp:

    This might sound dumb, but is there a way to set a limit on an attribute so that after a certain number characters are typed in at the prompt, the prompt will close and the next prompt will appear?

    Thanks


    Bill
     
    BillZ, May 5, 2004
    #1
  2. Probably VBA would be a better bet. It will check the length of the string
    within a text box.

    so that after a certain number characters are typed in at the prompt, the
    prompt will close and the next prompt will appear?
     
    Allen Johnson, May 5, 2004
    #2
  3. BillZ

    Devin Guest

    BillZ,

    That sounds like controlling the input stream. I think you would have to
    use (grread) and convert the ascii codes to characters then echo them to the
    screen so the user can see what he's typing all the while creating a string
    variable that represents the user input. When the string reaches a certain
    length you (princ "\n") and continue? I did something similar when I
    created my own grread prompt myself. But it was made to use the combo of
    keyboard and mouse input.

    Devin
     
    Devin, May 5, 2004
    #3
  4. BillZ

    BillZ Guest

    Thanks,
    I may let this idea go as it could be problematic knowing the exact number of characters in the line.

    Bill
     
    BillZ, May 6, 2004
    #4
  5. BillZ

    Devin Guest

    Yes, I agree, the input stream functions are a little low level for Autolisp
    to handle. System to system the font and screen size changes so who knows
    what the length of the line is accept a real low level function, but
    typically there just isn't enough support in lisp to perform low level
    operations.
     
    Devin, May 6, 2004
    #5
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.