This may be usefull, note the first part which checks for directories ie drives.
- ; resets the paths usefull for update versions of Autocad; by A H 2011; This sets a reference to the install path of your product; the gets are their for info maybe other use; use this to find other settings ;(vlax-dump-object (vla-get-files (vla-get-preferences (vlax-get-Acad-object))) T)(vl-load-com)(defun setpaths ( / *files* doc) ; make temp directory(if (vl-file-directory-p "C:\\Acadtemp\")(Princ "Acadtemp exists")(vl-mkdir "C:\\AcadTEMP\"))(setq *files* (vla-get-files (vla-get-preferences (vlax-get-Acad-object)))); savepath;(vla-get-AutoSavepath *files*)(vla-put-AutoSavepath *files* "C:\\AcadTemp"); custom icons;(vla-get-CustomIconPath *files*))(vla-put-CustomIconPath *files* "P:\\Autodesk\\ICONS"); custom menu;(vla-get-Menufile *files*));(vla-put-Menufile *files* "C:\\Users\\2013COGG"); printers config;(vla-get-PrinterConfigPath *files*)(vla-put-PrinterConfigPath *files* "P:\\AutoDESK\\Plotting\\Plot Styles 2011"); printers style sheet;(vla-get-PrinterStyleSheetPath *files*)(vla-put-PrinterStyleSheetPath *files* "P:\\AutoDESK\\Plotting\\Plot Styles"); printer drv's;(vla-get-PrinterDescPath *files*)(vla-put-PrinterDescPath *files* "P:\\AutoDESK\\Plotting\\Drv"); print spooler;(vla-get-PrintSpoolerPath *files*)(vla-put-PrintSpoolerPath *files* "C:\\AcadTemp\"); template path;(vla-get-TemplateDwgPath *files*)(vla-put-TemplateDwgPath *files* "P:\\Autodesk\\c3d Templates"); template location;(vla-get-QnewTemplateFile *files*)(vla-put-QnewTemplateFile *files* "P:\\Autodesk\\c3d Templates\\gg.dwt");make new support paths exist + new(setq paths (vla-get-SupportPath *files*))(setq coggpaths "P:\\autodesk\\supportfiles;P:\\autodesk\\lisp;P:\\autodesk\\fonts;")(setq newpath (strcat coggpaths paths))(vla-put-SupportPath *files* newpath); Tempdirectory ;(vla-get-TempFilePath *files*))(vla-put-TempFilePath *files* "C:\\AcadTemp\"); PlotLogFilePath = "C:\\Documents and Settings\\ah\\localsettings\\application data\\autodesk\\c3d 2011\\enu\"(vla-put-PlotLogFilePath *files* "C:\\AcadTemp\"); LogFilePath = "C:\\Documents and Settings\\ah\\localsettings\\application data\\autodesk\\c3d 2011\\enu\"(vla-put-LogFilePath *files* "C:\\AcadTemp\"); xref temp path;(vla-get-TempXrefPath *files*))(vla-put-TempXrefPath *files* "C:\\AcadTemp\"); end use of *files*)(setpaths); exit quitely(princ "All Done")
|