vlisp for adding to support file search path

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
This adds the folder C:\TEMP1 to my support file search path (SFSP). However if I later use the same code to add a different folder such as C:\TEMP2, the first folder I added gets removed. How do I append to my current folders in SFSP and not replace any folder previously added.
;Load the VLisp support
(vl-load-com)
;Store a reference to the Application Object
(setq acadObject (vlax-get-acad-object))
;Store a reference to the Preferences Object
(setq prefsObject (vlax-get-property acadObject 'Preferences))
;Store a reference to the Files Object
(setq tabnameObject (vlax-get-property prefsObject 'Files))
;Get the Support Path
(setq thePath (vlax-get-property tabnameObject 'SupportPath))
;add your new path to the existing path variable
(setq thePath (strcat thePath ";" "C:\\TEMP1"))
(vlax-put-property tabnameObject 'SupportPath thePath)