Why while not work

Discussion in 'AutoCAD' started by Adesu, Mar 8, 2005.

  1. Adesu

    Adesu Guest

    here my script,would you explain to me ,why if this script added by
    while,this program can't work

    ; met is stand for making edit text
    ; Design by Ade Suharna <>
    ; 11 August 2004
    ; program no. 48/08/2004
    ; edit by Ade Suharna 17/09/2004 1).
    ; 05/10/2004 2).
    ; 07/03/2005 3).
    (defun c:met (/ e en ent opt ed)
    (while
    ; 2).
    (prompt "\nSELECT TEXT")
    (setq e (entsel ))
    (if e (= (getvar "errno") 7)(alert "\nINVALID CHOOSE,PLEASE TRY AGAIN"))
    ; 3).
    (setq en (entget (car e)))
    (setq ent (cdr (assoc 1 en)))
    (setq opt (getstring T (strcat "\nENTER NEW TEXT" "<" ent ">: ")))
    ; 1).
    (setq ed (subst (cons 1 opt)(assoc 1 en) en))
    (entmod ed)
    )
    (princ)
    )
     
    Adesu, Mar 8, 2005
    #1
  2. Adesu

    Rudy Tovar Guest

    (while (setq e (entsel "\nSELECT TEXT"))
    ; do what ever
    )
     
    Rudy Tovar, Mar 8, 2005
    #2
  3. Adesu

    Adesu Guest

    That's right,thanks Rudy for your corrected

     
    Adesu, Mar 8, 2005
    #3
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.