Polyline in my lisp

Discussion in 'AutoCAD' started by AIRIC, Mar 31, 2005.

  1. AIRIC

    AIRIC Guest

    I can't seem to get this lisp to work. The polyline part works great, but it does not recognize the fillet command. What's wrong with this?

    (setq p1 (getpoint "\nFirst point: "))
    (command "_pline" p1 "h" ".25" ".25")
    (while (= (logand (getvar "cmdactive") 1) 1)
    (command pause)
    )

    (command "fillet" "r" "2" "p" "l")

    Thanks,
    Eric L
     
    AIRIC, Mar 31, 2005
    #1
  2. AIRIC

    Paul Turvill Guest

    Try this:

    (setq p1 (getpoint "\nFirst point: "))
    (command "_pline" p1 "h" ".25" ".25")
    (while (= (logand (getvar "cmdactive") 1) 1)
    (command pause)
    )
    (setvar "filletrad" 2.0)
    (command "fillet" "p" "l")
    ___
     
    Paul Turvill, Mar 31, 2005
    #2
  3. AIRIC

    AIRIC Guest

    That was tooooo easy.

    Thanks for your help

    Eric L
     
    AIRIC, Mar 31, 2005
    #3
  4. thanks,
    i also learnd with this simple funtion
     
    ABC Computers Services, Apr 1, 2005
    #4
  5. AIRIC

    Adesu Guest

    Hi Paul,why you add

    (while (= (logand (getvar "cmdactive") 1) 1)
    (command pause)
    )
    can you describe it,yes I know if without that this script cannot work
     
    Adesu, Apr 4, 2005
    #5
  6. AIRIC

    Paul Turvill Guest

    I didn't add it; it's part of the OP's code. This issue has been discussed
    many, many times: it's to permit an active command (called by the
    (command...) function) to finish before LISP moves on to the next step in
    the code. And, yes, without it, the routine will not work properly.
    ___
     
    Paul Turvill, Apr 4, 2005
    #6
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.