Lisp running last command

Discussion in 'AutoCAD' started by jjfisk, Jan 14, 2004.

  1. jjfisk

    jjfisk Guest

    So I have a simple lisp:
    (defun C:lay85X11Port()
    (command "layout" "T" "I:\\ACAD-SHARE\\Template\\layouts.dwg" "8.5X11PORTRAIT"))

    for some reason when running it is decides to run the last command.... I looked for the obvious (ACAD must be seeing an enter somehwhere), but am still rather new at LISP and nothing is sticking out. Any ideas?
    TIA
    Justin
     
    jjfisk, Jan 14, 2004
    #1
  2. jjfisk

    ECCAD Guest

    If calling from menu pick, make sure that you don't have a ";"
    on the end of macro.
    Or, if this is not the case, you could add a (command) at end of function.
    (command "layout" .....
    (command)
    )

    Bob
     
    ECCAD, Jan 14, 2004
    #2
  3. jjfisk

    jjfisk Guest

    I am running it form a menu pick... When I ran it with just the command line it works fine so it must be something in the menu:
    ID_INSLAY10 [->8.5" X 11"]
    ID_INSLAY11 [Portrait]^P (C:lay85X11PORT)

    see anything wrong with this?
     
    jjfisk, Jan 14, 2004
    #3
  4. jjfisk

    Jim Claypool Guest

    Remove the space after the ^P

    line it works fine so it must be something in the menu:
     
    Jim Claypool, Jan 15, 2004
    #4
  5. jjfisk

    ECCAD Guest

    Also check for a (space) character at the end. Delete these.
    Detect by going to that line, touch 'End' key.
    Bob
     
    ECCAD, Jan 15, 2004
    #5
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.