script to saveas

Discussion in 'AutoCAD' started by nicolas_copernico2003, Feb 15, 2008.

  1. hello i wanted to write a script to copy the entire drawing to a new
    dwg and then save it with the same name as the original, my problem is
    at the end of the script, when i wanted to save it with the previous
    name. what could it be, i would let yo see my scr if you see something
    wrong.
    Thank you very much.
    nicolas_copernico2003"at"yahoo.com.ar

    filedia
    0
    lispinit
    0
    (defun c:border_update(/ dn pa pawb md panbdn aux panbdn2)
    (setq dn (getvar "dwgname"))
    (setq pa (getvar "dwgprefix"))
    (setq aux (strcat pa "Original_"))
    (setq panbdn2(strcat aux dn))
    (setq panbdn(strcat pa dn));i save the name becouse then i would TRY
    save the new file with this name (but i cant :S)
    (command "SAVEAS" 2000 panbdn2) ;Here i save the original file with
    another name.
    )
    filedia
    0
    -lman
    save
    Original
    Export
    "C:\Docume nts and Settings\nuser\Escritorio\original.lay"
    yes

    -layer
    on
    *
    unlo ck
    *
    thaw
    *

    _copybase
    0,0,0
    all

    new;HERE I CREATE A NEW FILE TO PASTE ALL THE PREVIOUS DRAWING
    Yes

    (command "SAVEAS" 2000 panbdn) ;HERE IS MY PROBLEM!! THIS DOESNT WORK
    _pasteclip
    0,0,0
    -lman
    Import
    "C:\Documents and Settings\nuser\Escritorio\original.lay"
    Restore
    Original
    delete
    ori ginal

    lispinit
    1
     
    nicolas_copernico2003, Feb 15, 2008
    #1
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.