Shared insight:

Discussion in 'AutoCAD' started by TCEBob, Dec 5, 2004.

  1. TCEBob

    TCEBob Guest

    Ok, I know everyone knows this already. But I just figgered it out. Remember
    where you use
    (while (= (logand (getvar "cmdactive") 1) 1)(command pause)) to allow multi
    inputs to a command? Well, I just woke up and realized that as long as we have a
    (while) going, we can add other stuff to it. The following illustrates:

    (defun c:pcl( / ) ;pline end with close
    (setq prmpt "\nSpecify start point: ")
    (command "pline")
    (while (= (logand (getvar "cmdactive") 1) 1)
    (princ prmpt)
    (setq prmpt"\nSpecify next point or [Arc/Halfwidth/Length/Undo/Width]: ")
    (command pause)
    ) ;while
    (command "pedit" "L" "close" "")
    (princ))

    rs
     
    TCEBob, Dec 5, 2004
    #1
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.