I am modifying the following example code shown below to set AutoCAD 'vanilla' support files to reference a local path/folder (C:\ACAD) instead of the network paths supplied in the sample below.
Hopefully, this will be simpler to do than I expect. See the attached mage for my subfolder list. All subfolders will be used except for CAD_DOCS and CAD_UTILS.
HELP: I am inexperienced at LISP and need direction on the use of the code snippet to reference a local path/folder (C:\ACAD)]
What do I need to change in the following example code?
Do I need the "ROAMABLEROOTPREFIX" portion?
; 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;
EXAMPLE CODE FOLLOWS from R.K. McSwain at CAD PANACEA http://rkmcswain.blogspot.com/2006/0...setup-and.html
----------------------------------------------------------------------
You should place this in your ACAD.LSP file, not ACAD200x.LSP.PHP Code: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*)
---------------------------------
Thanks for your help!!!


Reply With Quote