DWGNAME ANOMALY?

Discussion in 'AutoCAD' started by justindavidwerner, Mar 21, 2005.

  1. Just doing fine... now working as a Janitor.... hehe [and looking for
    something to do, for Friday & Saturday]
    Are you moving to San Diego, California?

    Anyway... very good catch that one, for the system variables.


    LE.
     
    Luis Esquivel, Mar 21, 2005
    #21
  2. justindavidwerner

    Don Butler Guest

    Think about the second line...(= DWGNAME "Drawing1.dwg")

    The variable DWGNAME is not bound to anything.

    Bind it first and try it again... (setq DWGNAME (getvar "dwgname"))

    (= "Drawing1.dwg" dwgname)
    T

    Don
     
    Don Butler, Mar 21, 2005
    #22
  3. I almost want to start a new discussion but I will continue it here.

    Why does (command "_new" "D-JOBNO-0G1.1.DWT") work fine with SDI set to 1 (with a "Y" in between to discard changes in a new unchanged drawing), but once you set SDI to 0 AutoCAD says "Unknown command
    "D-JOBNO-0G1.1.DWT". Press F1 for help."?????
     
    justindavidwerner, Mar 24, 2005
    #23
  4. p.s.

    If you do it on the command line in AutoCAD:

    _NEW (Enter)
    D-JOBNO-0G1.1.DWT (Enter)

    it works fine
     
    justindavidwerner, Mar 24, 2005
    #24
  5. This is a continuation of:

    http://discussion.autodesk.com/thread.jspa?messageID=4770472&#4770472

    I think everyone thought all problems were solved but they are not, so now I start a new thread.

    Why does (command "_new" "D-JOBNO-0G1.1.DWT") work fine with SDI set to 1 (with a "Y" in between to discard changes in a new unchanged drawing), but once you set SDI to 0 AutoCAD says "Unknown command
    "D-JOBNO-0G1.1.DWT". Press F1 for help."?????

    p.s.

    If you do it on the command line in AutoCAD:

    _NEW (Enter)
    D-JOBNO-0G1.1.DWT (Enter)

    it works fine

    Please see link above for more info.
     
    justindavidwerner, Mar 28, 2005
    #25
  6. justindavidwerner

    ECCAD Guest

    Justin,
    Send me an E-Mail with your 'latest' attempt.

    (remove the nospam + the ".")
    I think you need a combination Lisp, and Script to
    handle both SDI 0 and SDI 1 conditions.
    Maybe I can come up with a solution.

    Bob Shaw
     
    ECCAD, Mar 28, 2005
    #26
  7. justindavidwerner

    jlspartz Guest

    Because once you change the SDI to 0, then it doesn't need a "Y" to the command line because it never asks you that question. So when it's asking you which file to open you are saying "Y" and then it doesn't find the file and you are then saying the drawing name as a separate command.
     
    jlspartz, Mar 28, 2005
    #27
  8. justindavidwerner

    jlspartz Guest

    Ahhh, I see your delema now. _new and _open are both not acceptable commands through lisp. Neither is ._new. You are going to have to do that through a script. Write your lisp separately, then with a script do the opening of new drawing and perform the lisp through the script.

    To call out the script do:

    (defun c:runscript ()
    (setvar "cmdecho" 0)
    (setvar "filedia" 0)
    (command "script" "C:\\temp\\myscript.scr")
    (setvar "filedia" 1)
    (setvar "cmdecho" 1)
    (princ)
    )


    The script (myscript.scr) would look like:

    _new
    template.dwt
    (c:mylisp)
    _saveas

    Mylisp would be another the command for whatever you want to do to the drawing before saving it, and the savas at the end will pop up for them to pick a location for them to save the file.

    Then on your menu, your command would be:

    runscript
     
    jlspartz, Mar 28, 2005
    #28
  9. justindavidwerner

    ECCAD Guest

    jlspartz,
    see the other thread on this by: justindavidwerner
    We went that route.
    Bob
     
    ECCAD, Mar 28, 2005
    #29
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.