
Originally Posted by
BIGAL
It can be done directly add or remove
Code:
; This sets a reference to the install path of your product
; the gets are their for info maybe other use
(vl-load-com)
; make temp directory
;(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")
; 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 location
;(vla-get-QnewTemplateFile *files*)
(vla-put-QnewTemplateFile *files* "P:\\Autodesk\\c3d Templates\\cogg.dwt")
;make new support paths exist + new
(setq paths (vla-get-SupportPath *files*))
(setq newpaths
"P:\\autodesk\\supportfiles;
P:\\autodesk\\lisp;
P:\\autodesk\\fonts;
P:\\autodesk\\hfs fonts;"
)
(setq newpath (strcat newpaths paths))
(vla-put-SupportPath *files* newpath)
; Tempdirectory
;(vla-get-TempFilePath *files*))
(vla-put-TempFilePath *files* "C:\\ACADTemp\\")
; template path
;(vla-get-TemplateDwgPath *files*)
(vla-put-TemplateDwgPath *files* "P:\\Autodesk\\c3d Templates")
; xref temp path
;(vla-get-TempXrefPath *files*))
(vla-put-TempXrefPath *files* "C:\\ACADTemp\\")
; end use of *files*
(vlax-release-object *files*)
; exit quitely
(princ "All Done")
All most forgot you can use profiles and have different icons on your desktop to to run different menus and setups. You basicly need two things a ARG & a Cui they live together. Just use the lisp above to set the path structure and save a ARG the one missing is the main custom menu I will try to find variable.
BIGAL, using a combination of your information and some other advice on using the ACAD.lsp and ACADDOC.lsp I have got the support paths working as desired for my company standards, the problem I have now is these are also loading for my client configs. Cilents are fired from a /p shortcut switch to a different network location which loads the client arg.
I'm assuming this has something to do with local registry settings as most of the issues I encounter seem to end up that way.
Am I missing something here to keep seperate configs from being ignored?
Here is my company standards ACAD.lsp
Code:
; Set registry file search paths
(setenv "SaveFilePath" (strcat "C:\\ACAD\\"(getvar "loginname")))
(setenv "LogFilePath" (strcat "C:\\ACAD\\"(getvar "loginname")))
(setenv "ActRecPath" (strcat "C:\\ACAD\\"(getvar "loginname")))
(setenv "ActRecPath" (strcat "C:\\ACAD\\"(getvar "loginname")))
(setenv "PlotLogPath" (strcat "C:\\ACAD\\"(getvar "loginname")))
(setenv "ACADDRV" (strcat "C:\\Program Files\\Autodesk\\AutoCAD 2012 - English\\drv"))
(setenv "EnterpriseMenuFile" (strcat "c:\\acad\\ACAD-2012-LOCAL\\support\\SWD-Default.cuix"))
(setenv "QnewTemplate" (strcat "c:\\acad\\ACAD-2012-LOCAL\\template\\SWD2012.dwt"))
(princ)
(vl-load-com)
; 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
"C:\\ACAD\\"(getvar "loginname")"\\support;"
"C:\\ACAD\\ACAD-2012-LOCAL\\03-Fonts;"
"C:\\ACAD\\ACAD-2012-LOCAL\\04-CTB-Files;"
"C:\\ACAD\\ACAD-2012-LOCAL\\05-AutoCAD Pattern Files;"
"C:\\ACAD\\ACAD-2012-LOCAL\\support;"
"C:\\ACAD\\ACAD-2012-LOCAL\\support\\color;"
)
)
; This actually applies the above string to the current session of AutoCAD.
(vla-put-SupportPath *files* sfsp)
; Release the object
(vlax-release-object *files*)
(command "Menu" (strcat "c:\\acad\\"(getvar "loginname")"\\support\\mymenu.cuix"))
(princ)
And the only relevant item in my ACADDOC is
Code:
;Load this just once
(SETVAR "acadlspdoc" 0)
Bookmarks