Message 1 of 5
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello Everyone,
I am looking to add the support file search path through acaddoc.lsp. I am thinking of using the Leemac's function to do this. Apologies, as I am new to lisp programming.
;; 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)
)
)
How can I add the userprofile and combine it with the file location? The below code is not working.
(LM:sfsp+ '("(strcat (getenv "userprofile") "\\xxx\\xxxx\\xxxx")))
Also, when I add the below code in the acaddoc.lsp it shows the command in the command history when a new drawing is opened. How can I avoid this?
(Command "FILETAB")
You help is highly appreciated and thanks in advance.
Solved! Go to Solution.