How to make a pline and offfset

Discussion in 'AutoCAD' started by Rogerio_Brazil, Dec 28, 2004.

  1. Hello,

    How to make a pline (with various vertices, without pause - command "pline" pause pause pause), with autolisp, and make a offset of a pline after.

    Sample:

    ;;#pline - sub-function after Pline1
    (defun #pline ()
    (SETQ ENTLWPL1 (ENTGET (ssname (ssget "l") 0))) ;;select a last pline
    (setq p1 (getpoint "\n Offset point: "))
    (command "offset" "10" ENTLWPL1 p1 "")
    (princ))

    (defun c:pline1 ()
    (command "pline");;various vertices pline
    ;;here, how to make a pline with various vertices, and use offset after.; without pause
    (#pline) ;;sub-function after make pline
    (princ))

    Thanks in advance,

    Rogerio
     
    Rogerio_Brazil, Dec 28, 2004
    #1
  2. Rogerio_Brazil

    R.K. McSwain Guest



    (command "._pline")
    (while (eq 1 (logand 1 (getvar "cmdactive")))
    (command pause)
    )
    (command "._offset" "10.0" (entlast))
     
    R.K. McSwain, Dec 28, 2004
    #2
  3. McSwain ,

    Thank very much!!!

    Rogerio
     
    Rogerio_Brazil, Dec 29, 2004
    #3
  4. Hello McSwain ,

    Please, how to work the funciton:

    (eq 1 (logand 1 (getvar "cmdactive")))

    eq 1 ???

    (logand 1 ???

    A programer in Brazil make a question.

    Thank very much. sorry my english.

    Rogerio
     
    Rogerio_Brazil, Dec 30, 2004
    #4
  5. The CmdActive system variable stores bitcodes, e.g. 1, 2, 4, 8 and
    combinations thereof.

    (logand) returns the bit tested using a Boolean AND, e.g. (logand 1 1)
    returns 1, (logand 1 3) returns 1 (bit 0 is set in the second integer which
    equals 1). Another way of looking at that 2nd example is in binary:

    01 AND 11 = 01

    So McSwain is testing to see if bit 0 (integers 0 and 1) is set in the
    system variable.

    --
    R. Robert Bell


    Hello McSwain ,

    Please, how to work the funciton:

    (eq 1 (logand 1 (getvar "cmdactive")))

    eq 1 ???

    (logand 1 ???

    A programer in Brazil make a question.

    Thank very much. sorry my english.

    Rogerio
     
    R. Robert Bell, Dec 30, 2004
    #5
  6. Thank very much,

    Rogerio
     
    Rogerio_Brazil, Jan 3, 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.