Jump to content

LeeMac: Add & Remove Support File Search Paths


Recommended Posts

Posted

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.

Posted

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?

Posted

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.

 

 

Posted

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

Posted (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 by BIGAL
Posted

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

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...