I am a bit of a novice with programming, but have tried to set the profiles for our office using acad.lsp examples from this forum (acad 2009). My adjustments to the paths are below. It all seems to work well except that I get the following error when autocad is launched:
Command: ; error: Automation Error. Error setting preference property
Can anyone tell me what this refers to?
My acad.lsp below:
(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
"\\\\EVE\\B5\\ACAD_B5;"
"\\\\EVE\\B5\\ACAD_B5\\LISP;"
"\\\\EVE\\B5\\ACAD_B5\\ICO;"
"\\\\EVE\\B5\\ACAD_B5\\PRINTER;"
(getvar "LOCALROOTPREFIX") "SUPPORT;"
"C:\\Program Files\\CDG\\CDG Change Case;"
"\\\\EVE\\B5\\SY;"
acadloc "\\SUPPORT;"
acadloc "\\HELP;"
acadloc "\\FONTS;"
acadloc "\\EXPRESS;"
acadloc "\\SUPPORT\\COLOR;"
)
)
; 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* "\\\\EVE\\B5\\ACAD_B5\\TEMPLATE")
(vla-put-PrinterConfigPath *files* "\\\\EVE\\B5\\ACAD_B5\\PRINTER")
(vla-put-PrinterDescPath *files* "\\\\EVE\\B5\\ACAD_B5\\PRINTER")
(vla-put-PrinterStyleSheetPath *files* "\\\\EVE\\B5\\ACAD_B5\\PRINTER")
(vla-put-QnewTemplateFile *files* "\\\\EVE\\B5\\ACAD_B5\\TEMPLATE\\B5.dwt")
(vla-put-MenuFile *files* "%LocalRootPrefix%\\SUPPORT\\USER.CUI")
(vla-put-EnterpriseMenuFile *files* "\\\\EVE\\B5\\ACAD_B5\\B5.CUI")
(vla-put-CustomIconPath *files* "\\\\EVE\\B5\\ACAD_B5\\ICON")
(vla-put-AltFontFile *files* "\\\\EVE\\B5\\ACAD_B5\\SIMPLEX.SHX")
;
; Release the object
(vlax-release-object *files*)
;
;You should place this in your ACAD.LSP file, not ACAD200x.LSP.