woodman78 Posted April 5, 2019 Posted April 5, 2019 I want to remove more than just the support path from a setup. I want to remove the customization path, tool palettes path etc. Can I use this to do that? I have tried but failed. http://www.lee-mac.com/addremovesupportpaths.html (defun c:removepaths () (vl-load-com) (LM:sfsp+ '("m:\\cccdata\\autocad_templates\\roaddesignoffice\\do_not_modify\\enterprise cui file - do not delete" "C:\\users\\home\\downloads" )) (princ) ) ;; Add Support File Search Paths - Lee Mac ;; Adds a list of Support File Search Paths, excluding duplicates and invalid paths. ;; lst - [lst] list of paths to add, e.g. '("C:\\Folder1" "C:\\Folder2" ... ) ;; Returns: [str] "ACAD" Environment String following modification (defun LM:sfsp+ ( lst ) ( (lambda ( str lst ) (if (setq lst (vl-remove-if '(lambda ( x ) (or (vl-string-search (strcase x) (strcase str)) (not (findfile x)) ) ) lst ) ) (setenv "ACAD" (strcat str ";" (apply 'strcat (mapcar '(lambda ( x ) (strcat x ";")) lst)))) ) ) (vl-string-right-trim ";" (getenv "ACAD")) (mapcar '(lambda ( x ) (vl-string-right-trim "\\" (vl-string-translate "/" "\\" x))) lst) ) ) Thanks in advance. Quote
tombu Posted April 5, 2019 Posted April 5, 2019 First create a new profile in Options for what you're trying to do so you'll still have a working profile in case you need it later on. Without a CUIX file in the customization path I don't think AutoCAD would even start. Could you explain what it is you're trying to do? Quote
woodman78 Posted April 6, 2019 Author Posted April 6, 2019 Thanks tombu. I should have explained a bit more. I want to remove all the paths for a current setup that are linked to a local server and replace them with paths from a company wide server in order to roll out my setup more widely. Quote
tombu Posted April 6, 2019 Posted April 6, 2019 So Lee's code took care of modifying the "Support File Search Paths" then? You may need similar code to modify "Trusted Paths" as well. A copy of Lee's code substituting (getvar 'trustedpaths) for (getenv "ACAD") and (setvar 'trustedpaths for (setenv "ACAD" should work. BIGAL's code should help with the rest: rkmcswain's idea may help as well http://forums.augi.com/showthread.php?168357-Plotting-another-company-s-drawing&p=1322685&viewfull=1#post1322685 Quote
BIGAL Posted April 6, 2019 Posted April 6, 2019 (edited) A bit more the trusted paths plus load menus. (setq oldtrust (getvar 'trustedpaths)) (setq newtrust (strcat oldtrust ";" "L:\\Autodesk...")) (setvar 'trustedpaths newtrust) (command "menuload" "L:\\autodesk\\lisp\\surfal") (menucmd "P20=+SURFAL.POP1") (command "menuload" "L:\\autodesk\\lisp\\STDS9") (menucmd "P21=+STDS.POP1") (command "menuload" "L:\\autodesk\\lisp\\2011") (menucmd "P22=+2011.POP1") (princ "All Done") ) ; defun (setpaths) (alert "Run user script for toolbars") Edited April 6, 2019 by BIGAL Quote
BIGAL Posted April 6, 2019 Posted April 6, 2019 The end user preferred toolbars have been seperately recorded as a script. -toolbar Draw show -toolbar Layers show -toolbar Dimensions show -toolbar Inquiry show -toolbar Multileader show -toolbar Properties show -toolbar Viewports show Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.