+ Reply to Thread
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 18
  1. #1
    Forum Newbie
    Using
    AutoCAD 2010
    Join Date
    Nov 2009
    Posts
    2

    Default Lisp Command For Setting The Auto File Save Location

    Registered forum members do not see this ad.

    Does anybody know what the command is to set the Auto save file location using a lisp routine

    like the following sets the Template path,

    (vla-put-TemplateDwgPath *files* "\\\\Server\\Data\\Cad_Programs\\Autocad\\Draw ing Templates")

    I need to set the Autosave file location.

    Please Help!!!!

  2. #2
    Super Member MarcoW's Avatar
    Computer Details
    MarcoW's Computer Details
    Operating System:
    Microsoft Windows 7 Pro 64-bit
    Computer:
    A black one
    CPU:
    Intel Xeon E5520 Quad Core
    RAM:
    8 GB
    Graphics:
    NVIDIA Quadro FX 580 - 512MB
    Primary Storage:
    300 GB 10000 RPM
    Using
    AutoCAD 2011
    Join Date
    Apr 2009
    Location
    The Netherlands
    Posts
    599

    Default

    Do you happen to be dutch?

    Code:
     
    ; MarcoW 09-11-2009
    ;
    ; first create the function
    ; and localise the variables used
     (defun c:asf ( / asfloc oldloc)
    ; then set some variables that will be used
     (setq asfloc (getstring T "\nPlease enter the automatic Save File Location as desired:  ")
      oldloc (getvar "savefilepath")
     ); end of setq
    ; put the new path into the systemvariable
     (setvar "savefilepath" asfloc)
    ; show the old location once more, you might want to write down its location for you never know if you want it back
     (alert (strcat "The old path was: " oldloc))
    ; clean exit
      (princ)
    ; end of defun
    )
    Just wrote it but I guess it works.

    Someone might help you along getting the right folder by selecting it in a dialog box.

  3. #3
    Forum Newbie
    Using
    AutoCAD 2010
    Join Date
    Nov 2009
    Posts
    2

    Default

    Thanks .

    Nope not Dutch, Afrikaans from South Africa simlilar to Dutch.

  4. #4
    Full Member Tekenmeester's Avatar
    Computer Details
    Tekenmeester's Computer Details
    Operating System:
    Win Vista 64bit
    Computer:
    Dell T7500
    Using
    AutoCAD 2011
    Join Date
    Jul 2009
    Posts
    37

    Default Look in options

    Is this not what you are looking for?

    It is in options under the files tab.
    Attached Images

  5. #5
    Luminous Being alanjt's Avatar
    Using
    Civil 3D 2013
    Join Date
    Apr 2008
    Posts
    6,144

    Default

    I wrote this a while back to run on new machines for complete setup.
    Obviously, you will have to make changes to the specifics, but it will have what you are looking for.

    Code:
    (defun c:CES-Setup (/ #Files #Layout #Flag)
      (vl-load-com)
      (and
        (not
          (vl-catch-all-error-p
            (vl-catch-all-apply
              '(lambda ()
                 (setq #Files  (vla-get-files
                                 (vla-get-preferences (vlax-get-acad-object))
                               ) ;_ vla-get-files
                       #Layout (vla-get-activelayout
                                 (vla-get-activedocument (vlax-get-acad-object))
                               ) ;_ vla-get-activelayout
                 ) ;_ setq
                 ;; *********************
                 ;; **  AutoSave Path  **
                 ;; *********************
                 (mapcar 'vl-mkdir (list "c:\\TEMP" "c:\\TEMP\\ACAD"))
                 (vla-put-autosavepath #Files "c:\\TEMP\\ACAD")
                 ;; ***************************
                 ;; **  Printer Config Path  **
                 ;; ***************************
                 (vla-put-PrinterConfigPath
                   #Files
                   "s:\\cadd standards\\Plotters"
                 ) ;_ vla-put-PrinterConfigPath
                 (vla-refreshplotdeviceinfo #Layout)
                 ;; ***********************
                 ;; **  Plotstyles Path  **
                 ;; ***********************
                 (vla-put-printerstylesheetpath
                   #Files
                   "s:\\cadd standards\\Plotstyles"
                 ) ;_ vla-put-printerstylesheetpath
                 (vla-refreshplotdeviceinfo #Layout)
                 ;; *********************
                 ;; **  Template Path  **
                 ;; *********************
                 (vla-put-TemplateDwgPath
                   #Files
                   "s:\\cadd standards\\Template"
                 ) ;_ vla-put-TemplateDwgPath
                 ;; *********************
                 ;; **  QNew Template  **
                 ;; *********************
                 (vla-put-QNewTemplateFile
                   #Files
                   "s:\\cadd standards\\Template\\CES_Template.dwt"
                 ) ;_ vla-put-QNewTemplateFile
                 ;; *********************
                 ;; **  Support Paths  **
                 ;; *********************
                 (vla-put-supportpath
                   #Files
                   (strcat ";s:\\cadd standards\\startup"
                           ";s:\\cadd standards\\lisp"
                           ";s:\\cadd standards\\linetypes"
                           ";s:\\cadd standards\\fonts"
                           ";s:\\cadd standards\\ces layers"
                           ";"
                           (vla-get-supportpath #Files)
                   ) ;_ strcat
                 ) ;_ vla-put-supportpath
                 ;; ***************************
                 ;; **  Tool Palettes Paths  **
                 ;; ***************************
                 (vla-put-ToolPalettePath
                   #Files
                   (strcat "S:\\CADD Standards\\Toolpalette\\Palettes;"
                           (vla-get-ToolPalettePath #Files)
                   ) ;_ strcat
                 ) ;_ vla-put-ToolPalettePath
               ) ;_ lambda
            ) ;_ vl-catch-all-apply
          ) ;_ vl-catch-all-error-p
        ) ;_ not
        (alert
          (strcat
            "AutoCAD has been setup for Capital Engineering & Surveying, Inc. Standards.\n\n"
            "                      Please restart AutoCAD."
          ) ;_ strcat
        ) ;_ alert
      ) ;_ and
      (princ)
    ) ;_ defun
    (alert "Type: \"CES-SETUP\" to run setup.")
    (princ)
    DropBox | finding the light...
    Seann: ...it went crazy ex-girlfriend on me...
    eric_monceaux...its pretty funny seeing two AutoCAD Gods give each other flak...

  6. #6
    Junior Member
    Using
    AutoCAD 2010
    Join Date
    Aug 2011
    Posts
    14

    Default

    Quote Originally Posted by alanjt View Post
    I wrote this a while back to run on new machines for complete setup.
    Obviously, you will have to make changes to the specifics, but it will have what you are looking for.

    Code:
    (defun c:CES-Setup (/ #Files #Layout #Flag)
      (vl-load-com)
      (and
        (not
          (vl-catch-all-error-p
            (vl-catch-all-apply
              '(lambda ()
                 (setq #Files  (vla-get-files
                                 (vla-get-preferences (vlax-get-acad-object))
                               ) ;_ vla-get-files
                       #Layout (vla-get-activelayout
                                 (vla-get-activedocument (vlax-get-acad-object))
                               ) ;_ vla-get-activelayout
                 ) ;_ setq
                 ;; *********************
                 ;; **  AutoSave Path  **
                 ;; *********************
                 (mapcar 'vl-mkdir (list "c:\\TEMP" "c:\\TEMP\\ACAD"))
                 (vla-put-autosavepath #Files "c:\\TEMP\\ACAD")
                 ;; ***************************
                 ;; **  Printer Config Path  **
                 ;; ***************************
                 (vla-put-PrinterConfigPath
                   #Files
                   "s:\\cadd standards\\Plotters"
                 ) ;_ vla-put-PrinterConfigPath
                 (vla-refreshplotdeviceinfo #Layout)
                 ;; ***********************
                 ;; **  Plotstyles Path  **
                 ;; ***********************
                 (vla-put-printerstylesheetpath
                   #Files
                   "s:\\cadd standards\\Plotstyles"
                 ) ;_ vla-put-printerstylesheetpath
                 (vla-refreshplotdeviceinfo #Layout)
                 ;; *********************
                 ;; **  Template Path  **
                 ;; *********************
                 (vla-put-TemplateDwgPath
                   #Files
                   "s:\\cadd standards\\Template"
                 ) ;_ vla-put-TemplateDwgPath
                 ;; *********************
                 ;; **  QNew Template  **
                 ;; *********************
                 (vla-put-QNewTemplateFile
                   #Files
                   "s:\\cadd standards\\Template\\CES_Template.dwt"
                 ) ;_ vla-put-QNewTemplateFile
                 ;; *********************
                 ;; **  Support Paths  **
                 ;; *********************
                 (vla-put-supportpath
                   #Files
                   (strcat ";s:\\cadd standards\\startup"
                           ";s:\\cadd standards\\lisp"
                           ";s:\\cadd standards\\linetypes"
                           ";s:\\cadd standards\\fonts"
                           ";s:\\cadd standards\\ces layers"
                           ";"
                           (vla-get-supportpath #Files)
                   ) ;_ strcat
                 ) ;_ vla-put-supportpath
                 ;; ***************************
                 ;; **  Tool Palettes Paths  **
                 ;; ***************************
                 (vla-put-ToolPalettePath
                   #Files
                   (strcat "S:\\CADD Standards\\Toolpalette\\Palettes;"
                           (vla-get-ToolPalettePath #Files)
                   ) ;_ strcat
                 ) ;_ vla-put-ToolPalettePath
               ) ;_ lambda
            ) ;_ vl-catch-all-apply
          ) ;_ vl-catch-all-error-p
        ) ;_ not
        (alert
          (strcat
            "AutoCAD has been setup for Capital Engineering & Surveying, Inc. Standards.\n\n"
            "                      Please restart AutoCAD."
          ) ;_ strcat
        ) ;_ alert
      ) ;_ and
      (princ)
    ) ;_ defun
    (alert "Type: \"CES-SETUP\" to run setup.")
    (princ)
    bit of a thread bump, I have tried the code I have quoted and it does nothing...

    i'm using AutoCAD2013 full,

    I have copied the full code into an open lisp box, saved it as CES-SETUP
    loaded it like I have many other LISP's and a warning box appears saying "type CES-SETUP to run"

    I do that and nothing, the command line shows no error, but just moves on like something happened. and just says command:

    in options, nothing has changed.

    I have also amended all the paths to suit my setup and still nothing...

    what am I doing wrong?

  7. #7
    Quantum Mechanic ReMark's Avatar
    Computer Details
    ReMark's Computer Details
    Operating System:
    Windows 7 Pro 64-bit
    Computer:
    Thinkmate
    Motherboard:
    Intel DX58SO2 LGA1366 X58
    CPU:
    Intel i7-960 Quad-core 3.20GHz 8MB cache
    RAM:
    12GB (3x4GB) PC3-106000 DDR3
    Graphics:
    nVidia Quadro 4000, 2GB GDDR5
    Primary Storage:
    150GB Velocipraptor 10,000 rpm
    Secondary Storage:
    none
    Monitor:
    Dell P24LLH - 24" wide screen LCD
    Discipline
    See details...
    ReMark's Discipline Details
    Occupation
    CAD Draftsman/Designer...chemical manufacturing.
    Discipline
    See details below.
    Details
    I work for a specialty chemical manufacturer. I do a little bit of everything from P&IDs to civil to architectural and structural.
    Using
    AutoCAD 2015
    Join Date
    Nov 2005
    Location
    Norwalk, CT USofA
    Posts
    40,123

    Default

    Did you make any changes to the code as recommend by alanjt?
    "I have only come here seeking knowledge. Things they wouldn't teach me of in college." The Police

    Eat brains...gain more knowledge!

    I'm now a full member of the Society for the Promotion of Mediocrity in CAD. Standards? We don't need no stinkin' standards! Take whatever advice I offer and do the opposite.

  8. #8
    Junior Member
    Using
    AutoCAD 2010
    Join Date
    Aug 2011
    Posts
    14

    Default

    Quote Originally Posted by ReMark View Post
    Did you make any changes to the code as recommend by alanjt?
    yes, here is my modified code. I also tried he code exactly, to see what would happen, and nothing happened with both codes

    Code:
    (defun c:setup (/ #Files #Layout #Flag)
      (vl-load-com)
      (and
        (not
          (vl-catch-all-error-p
            (vl-catch-all-apply
              '(lambda ()
                 (setq #Files  (vla-get-files
                                 (vla-get-preferences (vlax-get-acad-object))
                               ) ;_ vla-get-files
                       #Layout (vla-get-activelayout
                                 (vla-get-activedocument (vlax-get-acad-object))
                               ) ;_ vla-get-activelayout
                 ) ;_ setq
                 ;; *********************
                 ;; **  AutoSave Path  **
                 ;; *********************
                 (mapcar 'vl-mkdir (list "c:\\TEMP" "c:\\TEMP\\ACAD"))
                 (vla-put-autosavepath #Files "c:\\TEMP\\ACAD")
                 ;; ***************************
                 ;; **  Printer Config Path  **
                 ;; ***************************
                 (vla-put-PrinterConfigPath
                   #Files
                   "c:\\AutoCAD Setup\\Plotter files"
                 ) ;_ vla-put-PrinterConfigPath
                 (vla-refreshplotdeviceinfo #Layout)
                 ;; ***********************
                 ;; **  Plotstyles Path  **
                 ;; ***********************
                 (vla-put-printerstylesheetpath
                   #Filesls
                   "c:\\AutoCAD Setup\\Plot Styles"
                 ) ;_ vla-put-printerstylesheetpath
                 (vla-refreshplotdeviceinfo #Layout)
                 ;; *********************
                 ;; **  Template Path  **
                 ;; *********************
                 (vla-put-TemplateDwgPath
                   #Files
                   "c:\\AutoCAD Setup\\Template"
                 ) ;_ vla-put-TemplateDwgPath
                 ;; *********************
                 ;; **  QNew Template  **
                 ;; *********************
                 (vla-put-QNewTemplateFile
                   #Files
                   "=c:\\AutoCAD Setup\\Template\\PROJECT TEMPLATE.dwt"
                 ) ;_ vla-put-QNewTemplateFile
                 ;; *********************
                 ;; **  Support Paths  **
                 ;; *********************
                 (vla-put-supportpath
                   #Files
                   (strcat ";c:\\AutoCAD Setup\\Startup"
                           ";c:\\AutoCAD Setup\\lisp"
                           ";c:\\AutoCAD Setup\\Line Types"
                           ";c:\\AutoCAD Setup\\Fonts"
                           ";c:\\AutoCAD Setup\\Layers"
             ";c:\\AutoCAD Setup\\Hatch Patterns"
                           ";"
                           (vla-get-supportpath #Files)
                   ) ;_ strcat
                 ) ;_ vla-put-supportpath
                 ;; ***************************
                 ;; **  Tool Palettes Paths  **
                 ;; ***************************
                 (vla-put-ToolPalettePath
                   #Files
                   (strcat "c:\\AutoCAD Setup\\CAD_Blocks\\;"
                           (vla-get-ToolPalettePath #Files)
                   ) ;_ strcat
                 ) ;_ vla-put-ToolPalettePath
               ) ;_ lambda
            ) ;_ vl-catch-all-apply
          ) ;_ vl-catch-all-error-p
        ) ;_ not
        (alert
          (strcat
            "AutoCAD has been setup Standards.\n\n"
            "                   Please restart AutoCAD."
          ) ;_ strcat
        ) ;_ alert
      ) ;_ and
      (princ)
    ) ;defun
    (alert "Type: \"SETUP\" to run setup.")
    (princ)

  9. #9
    Quantum Mechanic ReMark's Avatar
    Computer Details
    ReMark's Computer Details
    Operating System:
    Windows 7 Pro 64-bit
    Computer:
    Thinkmate
    Motherboard:
    Intel DX58SO2 LGA1366 X58
    CPU:
    Intel i7-960 Quad-core 3.20GHz 8MB cache
    RAM:
    12GB (3x4GB) PC3-106000 DDR3
    Graphics:
    nVidia Quadro 4000, 2GB GDDR5
    Primary Storage:
    150GB Velocipraptor 10,000 rpm
    Secondary Storage:
    none
    Monitor:
    Dell P24LLH - 24" wide screen LCD
    Discipline
    See details...
    ReMark's Discipline Details
    Occupation
    CAD Draftsman/Designer...chemical manufacturing.
    Discipline
    See details below.
    Details
    I work for a specialty chemical manufacturer. I do a little bit of everything from P&IDs to civil to architectural and structural.
    Using
    AutoCAD 2015
    Join Date
    Nov 2005
    Location
    Norwalk, CT USofA
    Posts
    40,123

    Default

    You're interested in the entire code not just the portion that specifies the AutoSave file location?
    "I have only come here seeking knowledge. Things they wouldn't teach me of in college." The Police

    Eat brains...gain more knowledge!

    I'm now a full member of the Society for the Promotion of Mediocrity in CAD. Standards? We don't need no stinkin' standards! Take whatever advice I offer and do the opposite.

  10. #10
    Junior Member
    Using
    AutoCAD 2010
    Join Date
    Aug 2011
    Posts
    14

    Default

    Registered forum members do not see this ad.

    Quote Originally Posted by ReMark View Post
    You're interested in the entire code not just the portion that specifies the AutoSave file location?
    Yes the full code, i want it as a first setup for new machines, so i can just run the LISP

Similar Threads

  1. Save Location
    By Robertpse in forum AutoCAD General
    Replies: 3
    Last Post: 29th May 2009, 04:18 pm
  2. Setting default location for view labels how?
    By Safwah in forum Autodesk Inventor
    Replies: 4
    Last Post: 2nd Mar 2009, 01:24 pm
  3. Replies: 1
    Last Post: 6th Oct 2008, 09:40 pm
  4. Where to save a Lisp file?
    By amounjid in forum AutoCAD 2D Drafting, Object Properties & Interface
    Replies: 7
    Last Post: 23rd Sep 2008, 09:27 pm
  5. Setting a default location in a search dialogue box
    By cyclingg in forum AutoLISP, Visual LISP & DCL
    Replies: 5
    Last Post: 8th Oct 2007, 09:20 am

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts