Invalid option keyword

Discussion in 'AutoCAD' started by bthatcher, Apr 5, 2005.

  1. bthatcher

    bthatcher Guest

    I have to LISP routines in a single .lsp file. Only the first one will work when loaded. If I switch the order in the .lsp then the other one will work. After whichever one was first runs, it says 'Invalid option keyword'. Then when I try the other command is says 'Unknown command'. If I create separate .lsp files for the to 'commands', again only the first one that loaded works. I have attached the LISP in question. I am using them to turn on and off Xref's that are named 'X-Arch-#'. Any ideas what I am doing wrong? Thank you.
     
    bthatcher, Apr 5, 2005
    #1
  2. bthatcher

    Jürg Menzi Guest

    Hi bthatcher

    Missing quotation mark behind the layer name. Added international commands
    for my german AutoCAD.
    Code:
    (defun c:xf ()
    (command "_.layer" "_off" "X-Arch-*" "")
    (princ)
    )
    
    (defun c:xn ()
    (command "_.layer" "_on" "X-Arch-*" "")
    (princ)
    )
    Cheers
     
    Jürg Menzi, Apr 5, 2005
    #2
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.