Simple LISP question...

Discussion in 'AutoCAD' started by jimb, Sep 22, 2003.

  1. jimb

    jimb Guest

    Good day,

    I would like to know why this works in R14 and not 2000.

    (DEFUN C:TL ()
    (IF (="SS" (GETVAR "CLAYER"))
    (COMMAND "LAYER" "T" "CS" "S" "CS" "F" "SS" "")
    (IF (="CS"(GETVAR "CLAYER"))
    (COMMAND "LAYER" "T" "SS" "S" "SS" "F" "CS"
    "")))(PRINC))

    TIA

    jim
     
    jimb, Sep 22, 2003
    #1
  2. jimb

    JP Guest

    Try using this:
    (DEFUN C:TL ()
    (IF (="SS" (GETVAR "CLAYER")) ;check
    for current layer
    (COMMAND "LAYER" "T" "CS" "S" "CS" "F" "SS" "") ;ss
    active, set CS
    (COMMAND "LAYER" "T" "SS" "S" "SS" "F" "CS" "") ) ;cs
    active, set SS
    (PRINC)
    ); end defun

    Works on my PC perfectly.

    Jan
     
    JP, Sep 22, 2003
    #2
  3. jimb

    jimb Guest

    thanks

    both ways work.

    jimB
     
    jimb, Sep 23, 2003
    #3
  4. jimb

    jimb Guest

    (DEFUN C:TL ()
    (IF (="SS" (GETVAR "CLAYER"))
    ;check
    for current layer
    (COMMAND "LAYER" "T" "CS" "S" "CS" "F" "SS" "")
    ;ss
    active, set CS
    (COMMAND "LAYER" "T" "SS" "S" "SS" "F" "CS" "") )
    ;cs
    active, set SS
    (PRINC)
    thanks

    both ways work

    jimB
     
    jimb, Sep 23, 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.