Setting support paths via lisp

Here is an example of how to set your support file search paths using ACAD.LSP. By doing it using this method, you don’t have to worry about profiles, .ARG files, etc. Your users are free to customize anything not controlled by this startup routine. If something gets messed up, just restart AutoCAD, and everything reloads.

(vl-load-com)
; This sets a reference to the install path of your product
(setq acadloc
   (vl-registry-read
      (strcat "HKEY_LOCAL_MACHINE\\" (vlax-product-key))
   "ACADLOCATION")
); This sets a reference to the files portion of the acad preferences
(setq *files* (vla-get-files
   (vla-get-preferences (vlax-get-acad-object))
))
; This builds the string of support file search paths
(setq sfsp
       (strcat
  "\\\\SERVER\\CAD\\SUPPORT;"
  "\\\\SERVER\\CAD\\LISP;"
  "\\\\SERVER\\CAD\\FONTS;"
  (getvar "ROAMABLEROOTPREFIX") "SUPPORT;"
  acadloc "\\SUPPORT;"
  acadloc "\\HELP;"
  acadloc "\\EXPRESS;"
  acadloc "\\SUPPORT\\COLOR;"
  acadloc "\\LAND;"
  (getvar "LOCALROOTPREFIX") "SUPPORT;"
  "C:\\Program Files\\Common Files\\Autodesk Shared\\GIS\\FDO\\2.0;"
  "C:\\Program Files\\Common Files\\Autodesk Shared\\GIS\\FDO\\2.0\\Oracle;"
  "C:\\Program Files\\Common Files\\Autodesk Shared\\GIS\\FDO\\2.0\\ArcSDE;"
  "C:\\Program Files\\Autodesk Land Desktop 2006\\Land;"
  "C:\\Program Files\\Dotsoft\\Toolpac\\;"
  "C:\\Program Files\\Dotsoft\\XL2CAD"  
       )
)
; This actually applies the above string to the current session of AutoCAD.
(vla-put-SupportPath *files* sfsp)
; Here are some examples of setting other things
(vla-put-TemplateDwgPath *files* "\\\\SERVER\\CAD\\TEMPLATE")
(vla-put-PrinterConfigPath *files* "\\\\SERVER\\CAD\\PLOTTERS")
; Release the object
(vlax-release-object *files*)

You should place this in your ACAD.LSP file, NOT ACAD200x.LSP or ACADDOC.LSP or ACAD200xDOC.LSP.. By default, the ACAD.LSP file does not exist. You create it, you maintain it, you own it. AutoCAD will never make changes to this file.

Where do you put the ACAD.LSP file? In the directory that is at the TOP of your support file search path. In the above example, this one would go in
\\SERVER\CAD\SUPPORT