Options in command line

Discussion in 'AutoCAD' started by Kiwi Russ, Jun 2, 2004.

  1. Kiwi Russ

    Kiwi Russ Guest

    Hello people

    This is one of those questions I know I am going to kick myself afterwards!

    I'm calling up lisp from another one. The lisp that is called up then asks
    for one choice of several options from the comand line and this is what I'm
    stuck on.

    For example

    the lisp that is called up is called my "mylisp"
    and at the command line it asks for "/option1/Option2/<option3>:"

    So in the the lisp that calls up "mylisp"
    I have (c:mylisp)
    But how can I input one of the options eg if I want "option3"
    Writing (command "option3") doesn't work.

    Any ideas thanks Russ
     
    Kiwi Russ, Jun 2, 2004
    #1
  2. Kiwi Russ

    BillZ Guest

    HI Kiwi Russ ,

    I take it you are using getkword?
    You call the program that asks to choose an option....

    Guess I'm not sure what you are asking exactly.

    Bill
     
    BillZ, Jun 2, 2004
    #2
  3. Kiwi Russ

    bob.at Guest

    Hello,

    i think the best way to do this is the following: change your lisp you want to call from (defun c:mylisp ( / ) ) to (defun mylsip (myoption / )). Later in the lisp you use instead of:
    (setq option (getkword "option1/option2/option3"))
    the following:
    (setq option myoption)

    Then you can call the program with (mylisp the_option_i_want)

    bob.at
     
    bob.at, Jun 2, 2004
    #3
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.