pline in lisp

Discussion in 'AutoCAD' started by Cliff Davis, Aug 15, 2003.

  1. Cliff Davis

    Cliff Davis Guest

    I am trying to draw a polyline from within lisp with an unknown number of
    points. Is there a simple way to loop until enter is hit and then move on
    the next function. Something like:
    (command "pline" pause "w" "1" "" [infinite pauses until enter])
    (my_next_function)

    Thanks
    Cliff
     
    Cliff Davis, Aug 15, 2003
    #1
  2. Cliff Davis

    Smackypete Guest

    I'm not sure about that other verbose answer, but try this:

    (command "._pline")
    (while (eq 1 (logand 1 (getvar "CMDACTIVE")))
    (if a (command (setq a (getpoint a)))
    (command (setq a (getpoint)))
    )
    )
     
    Smackypete, Aug 16, 2003
    #2
  3. Cliff Davis

    2h@rm Guest

    try this set of code for example:

    (set pl-w-old (getvar "PLINEWID"))

    (setvar "PLINEWID" 1)

    (command "pline")
    (setq dg "N")
    (SETVAR "CMDECHO" 1)
    (while (= dg "N")
    (if (= (getvar "cmdnames") "PLINE")
    (command pause)
    (setq dg nil)
    )
    )

    (setvar "PLINEWID" pl-w-old)

    Michel
     
    2h@rm, Aug 18, 2003
    #3
  4. Cliff Davis

    Cliff Davis Guest

    Works like a charm, as usual this newsgroup is a lifesaver.
    Thanks a million
    Cliff


     
    Cliff Davis, Aug 18, 2003
    #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.