i have this lisp which i am hoping i can get some help improving. my boss wants me to create a toolbar which would allow the user to save the current support paths and then be able to load either the local support path or the server path. i modified this lisp creating a local and server save and load lisp. how can i read which is the active profile and save the current search paths to the appropriate files so the load function would work? or is there a better way i might be able to acheive this?
;;; Copyright (C) 1997-2003 JTB World, All Rights Reserved
;;; Website: www.jtbworld.com / http://jtbworld.vze.com
;;; E-mail: info@jtbworld.com / jtbworld@hotmail.com
;;;
;;; Save and loads support paths to a text file
;;;
;;; Change the path as wished
(defun C:ssp (/ files paths f)
(vl-load-com)
(setq files (vla-get-files (vla-get-preferences (vlax-get-acad-object))))
(setq paths (vla-get-supportpath files))
(setq f (open "c:\\0_LISP_FILES/paths.txt" "w"))
(write-line paths f)
(close f)
(princ)
)
(defun C:lsp (/ files paths f)
(vl-load-com)
(setq files (vla-get-files (vla-get-preferences (vlax-get-acad-object))))
(setq f (open "c:\\0_LISP_FILES/paths.txt" "r"))
(setq paths (read-line f))
(close f)
(vla-put-supportpath files paths)
(princ)
)