<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Modify Support Search Path- VBA in VBA Forum</title>
    <link>https://forums.autodesk.com/t5/vba-forum/modify-support-search-path-vba/m-p/2149447#M21835</link>
    <description>I want to first remove all teh paths specified in the "Support File Searcg Path" and then add my own paths.&lt;BR /&gt;
I can add my own , BUT I CANNOT find a way to remove the existing ones.&lt;BR /&gt;
I am using  VBA.&lt;BR /&gt;
&lt;BR /&gt;
Does anyone hae a snippet of code to get me going or point me in the right direction.&lt;BR /&gt;
&lt;BR /&gt;
Thanks.</description>
    <pubDate>Mon, 07 Jan 2008 07:37:22 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2008-01-07T07:37:22Z</dc:date>
    <item>
      <title>Modify Support Search Path- VBA</title>
      <link>https://forums.autodesk.com/t5/vba-forum/modify-support-search-path-vba/m-p/2149447#M21835</link>
      <description>I want to first remove all teh paths specified in the "Support File Searcg Path" and then add my own paths.&lt;BR /&gt;
I can add my own , BUT I CANNOT find a way to remove the existing ones.&lt;BR /&gt;
I am using  VBA.&lt;BR /&gt;
&lt;BR /&gt;
Does anyone hae a snippet of code to get me going or point me in the right direction.&lt;BR /&gt;
&lt;BR /&gt;
Thanks.</description>
      <pubDate>Mon, 07 Jan 2008 07:37:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/modify-support-search-path-vba/m-p/2149447#M21835</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2008-01-07T07:37:22Z</dc:date>
    </item>
    <item>
      <title>Re: Modify Support Search Path- VBA</title>
      <link>https://forums.autodesk.com/t5/vba-forum/modify-support-search-path-vba/m-p/2149448#M21836</link>
      <description>bilalakhan wrote:&lt;BR /&gt;
&amp;gt; I want to first remove all teh paths specified in the "Support File Searcg Path" and then add my own paths.&lt;BR /&gt;
&amp;gt; I can add my own , BUT I CANNOT find a way to remove the existing ones.&lt;BR /&gt;
&amp;gt; I am using  VBA.&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; Does anyone hae a snippet of code to get me going or point me in the right direction.&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; Thanks.&lt;BR /&gt;
&lt;BR /&gt;
Just set the paths you need. It will overwrite whatever is &lt;BR /&gt;
there. You do need to at least include the main support &lt;BR /&gt;
directory (C:\Documents and Settings\[user]\Application &lt;BR /&gt;
Data\Autodesk\[product]\[version]\[lang]\support)&lt;BR /&gt;
&lt;BR /&gt;
If you needed to append, then you would grab what is there, &lt;BR /&gt;
append the string, then push the string back.&lt;BR /&gt;
&lt;BR /&gt;
-- &lt;BR /&gt;
R.K. McSwain&lt;BR /&gt;
http://rkmcswain.blogspot.com</description>
      <pubDate>Mon, 07 Jan 2008 14:30:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/modify-support-search-path-vba/m-p/2149448#M21836</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2008-01-07T14:30:35Z</dc:date>
    </item>
    <item>
      <title>Re: Modify Support Search Path- VBA</title>
      <link>https://forums.autodesk.com/t5/vba-forum/modify-support-search-path-vba/m-p/2149449#M21837</link>
      <description>Hi ,&lt;BR /&gt;
Here an exemple in lisp (with DOSLIB!)&lt;BR /&gt;
Daniel OLIVES&lt;BR /&gt;
FRANCE-Lyon&lt;BR /&gt;
&lt;BR /&gt;
[CODE]&lt;BR /&gt;
(defun set_paths ()&lt;BR /&gt;
&lt;BR /&gt;
	;-------------------------------------------------------------------------------------------&lt;BR /&gt;
	; Définition du Path d'AutoCAD &lt;BR /&gt;
	;-------------------------------------------------------------------------------------------&lt;BR /&gt;
	(if (not (vl-bb-ref 'path_autocad))&lt;BR /&gt;
		(vl-bb-set 'path_autocad&lt;BR /&gt;
			(strcat&lt;BR /&gt;
				(vl-registry-read&lt;BR /&gt;
					(strcat&lt;BR /&gt;
						"HKEY_LOCAL_MACHINE\\"&lt;BR /&gt;
						(VLAX-PRODUCT-KEY)&lt;BR /&gt;
					)&lt;BR /&gt;
					"AcadLocation"&lt;BR /&gt;
				)&lt;BR /&gt;
				"\\"&lt;BR /&gt;
			)&lt;BR /&gt;
		)&lt;BR /&gt;
	)&lt;BR /&gt;
	;-------------------------------------------------------------------------------------------&lt;BR /&gt;
	; Définition du Path User d'AutoCAD &lt;BR /&gt;
	;-------------------------------------------------------------------------------------------&lt;BR /&gt;
	;  RoamableRootFolder&lt;BR /&gt;
	; C:\Documents and Settings\dolives\Données d'applications\Autodesk\AutoCAD 2006\R16.2\fra\&lt;BR /&gt;
	; HKEY_CURRENT_USER\Software\Autodesk\AutoCAD\R16.2\ACAD-4001:40C&lt;BR /&gt;
	; (VLAX-PRODUCT-KEY) = "Software\\Autodesk\\AutoCAD\\R16.2\\ACAD-4001:40c"&lt;BR /&gt;
	(setq pathsupportuser &lt;BR /&gt;
		(strcat&lt;BR /&gt;
			(vl-registry-read&lt;BR /&gt;
				(strcat&lt;BR /&gt;
					"HKEY_CURRENT_USER\\"&lt;BR /&gt;
					(VLAX-PRODUCT-KEY)&lt;BR /&gt;
				)&lt;BR /&gt;
				"RoamableRootFolder"&lt;BR /&gt;
			)&lt;BR /&gt;
			"Support\\"&lt;BR /&gt;
		)&lt;BR /&gt;
	)&lt;BR /&gt;
	(if (not (vl-bb-ref 'path_support_user))&lt;BR /&gt;
		(vl-bb-set 'path_support_user pathsupportuser)&lt;BR /&gt;
	)&lt;BR /&gt;
	&lt;BR /&gt;
	;-------------------------------------------------------------------------------------------&lt;BR /&gt;
	; Définition des répertoires d'AutoCAD  (File Support Search Path) &lt;BR /&gt;
	;-------------------------------------------------------------------------------------------&lt;BR /&gt;
	; http://www.fr.emea.mcneel.com/news/0307pr.htm&lt;BR /&gt;
	; pour 2006 "C:\Program Files\AutoCAD 2006\Support\"&lt;BR /&gt;
	(if (not (dos_strmatch (getenv "ACAD") (strcat "*" (vl-bb-ref 'path_autocad) "Support*")))&lt;BR /&gt;
			(setenv "ACAD" (strcat (vl-bb-ref 'path_autocad) "Support;"(getenv "ACAD")))&lt;BR /&gt;
	)&lt;BR /&gt;
	; pour 2006 "C:\Program Files\AutoCAD 2006\Support\"&lt;BR /&gt;
	(if (not (dos_strmatch (getenv "ACAD") (strcat "*" (vl-bb-ref 'path_autocad) "Fonts*")))&lt;BR /&gt;
			(setenv "ACAD" (strcat (vl-bb-ref 'path_autocad) "Fonts;"(getenv "ACAD")))&lt;BR /&gt;
	)&lt;BR /&gt;
	; pour 2006 "C:\Program Files\AutoCAD 2006\Help\"&lt;BR /&gt;
	(if (not (dos_strmatch (getenv "ACAD") (strcat "*" (vl-bb-ref 'path_autocad) "Help*")))&lt;BR /&gt;
			(setenv "ACAD" (strcat (vl-bb-ref 'path_autocad) "Help;"(getenv "ACAD")))&lt;BR /&gt;
	)&lt;BR /&gt;
	; pour 2006 "C:\Program Files\AutoCAD 2006\Express\"&lt;BR /&gt;
	(if (not (dos_strmatch (getenv "ACAD") (strcat "*" (vl-bb-ref 'path_autocad) "Express*")))&lt;BR /&gt;
			(setenv "ACAD" (strcat (vl-bb-ref 'path_autocad) "Express;"(getenv "ACAD")))&lt;BR /&gt;
	)&lt;BR /&gt;
	; pour 2006 "C:\Program Files\AutoCAD 2006\Support\Color\"&lt;BR /&gt;
	(if (not (dos_strmatch (getenv "ACAD") (strcat "*" (vl-bb-ref 'path_autocad) "Support\\Color*")))&lt;BR /&gt;
			(setenv "ACAD" (strcat (vl-bb-ref 'path_autocad) "Support\\Color;"(getenv "ACAD")))&lt;BR /&gt;
	)&lt;BR /&gt;
	;------------------------------------------------------------------------------------------------------------&lt;BR /&gt;
	; pour 2006 "C:\Documents and Settings\dolives\Données d'applications\Autodesk\AutoCAD 2006\R16.2\fra\Support\"&lt;BR /&gt;
	(if (not (dos_strmatch (getenv "ACAD") (strcat "*" pathsupportuser "*")))&lt;BR /&gt;
			(setenv "ACAD" (strcat pathsupportuser ";" (getenv "ACAD")))&lt;BR /&gt;
	)&lt;BR /&gt;
	;------------------------------------------------------------------------------------------------------------&lt;BR /&gt;
	; pour "C:\TPS\Acad\Routines"&lt;BR /&gt;
	(if (not (dos_strmatch (getenv "ACAD") (strcat "C:\TPS\Acad\Routines")))&lt;BR /&gt;
			(setenv "ACAD" (strcat (getenv "ACAD") ";" "C:\\TPS\\Acad\\Routines"))&lt;BR /&gt;
	)&lt;BR /&gt;
	(princ)&lt;BR /&gt;
	;------------------------------------------------------------------------------------------------------------&lt;BR /&gt;
	; pour "C:\Program Files\Egid\Cache"&lt;BR /&gt;
	(if (not (dos_strmatch (getenv "ACAD") (strcat "C:\Program Files\Egid\Cache")))&lt;BR /&gt;
			(setenv "ACAD" (strcat (getenv "ACAD") ";" "C:\\Program Files\\Egid\\Cache"))&lt;BR /&gt;
	)&lt;BR /&gt;
	(princ)&lt;BR /&gt;
	;-------------------------------------------------------------------------------------------&lt;BR /&gt;
	; Définition des répertoires des 'Template' = GABARIT &lt;BR /&gt;
	;-------------------------------------------------------------------------------------------&lt;BR /&gt;
	; O:\ACAD\param\Template&lt;BR /&gt;
	;&lt;BR /&gt;
	(setenv "TemplatePath" "O:\\ACAD\\param\\Template")&lt;BR /&gt;
	(princ "\n TemplatePath = O:\\ACAD\\param\\Template")&lt;BR /&gt;
	(setenv "QnewTemplate" "O:\\ACAD\\param\\Template\Egid_acad.dwt")&lt;BR /&gt;
	(princ "\n QnewTemplate = O:\\ACAD\\param\\Template\\Egid_acad.dwt")&lt;BR /&gt;
	;-------------------------------------------------------------------------------------------&lt;BR /&gt;
	; Définition du répertoire des XREFS &lt;BR /&gt;
	;-------------------------------------------------------------------------------------------&lt;BR /&gt;
	(setvar "XLOADPATH" "C:\\Program Files\\Egid\\Cache\\")&lt;BR /&gt;
	(princ "\n XLOADPATH = C:\\Program Files\\Egid\\Cache\\")&lt;BR /&gt;
	(setvar "visretain" 1)&lt;BR /&gt;
	(princ "\n VISRETAIN = 1")&lt;BR /&gt;
	(setvar "xreftype" 1)&lt;BR /&gt;
	(princ "\n XREFTYPE = 1")&lt;BR /&gt;
	(setvar "xrefnotify" 2)&lt;BR /&gt;
	(princ "\n XREFNOTIFY = 2")&lt;BR /&gt;
	; TRAYNOTIFY = 1&lt;BR /&gt;
	; TRAYTIMEOUT = 0 à 10 secondes&lt;BR /&gt;
	; n en minutes =  1 --&amp;gt; 10 080 (soit 7 jours)&lt;BR /&gt;
	(setenv "XNOTIFYTIME" "10")&lt;BR /&gt;
	(princ "\n XNOTIFYTIME = 10 minutes")&lt;BR /&gt;
&lt;BR /&gt;
	;-------------------------------------------------------------------------------------------&lt;BR /&gt;
	; Définition de la FONT alternative &lt;BR /&gt;
	;-------------------------------------------------------------------------------------------&lt;BR /&gt;
	(setvar "fontalt" "romanc.shx")&lt;BR /&gt;
	(princ "\n FONTALT = ROMAN.shx")&lt;BR /&gt;
	;-------------------------------------------------------------------------------------------&lt;BR /&gt;
	; Définition de la variable "XLOADCTL" a 2 soit chargement des xrefs ! &lt;BR /&gt;
	;-------------------------------------------------------------------------------------------&lt;BR /&gt;
	(SetPathType "2")&lt;BR /&gt;
	(princ "\n SETPATHTYPE =2")&lt;BR /&gt;
	;-------------------------------------------------------------------------------------------&lt;BR /&gt;
	; Définition du menu entreprise "TPS.cui" s'il existe ! &lt;BR /&gt;
	;-------------------------------------------------------------------------------------------	&lt;BR /&gt;
	;(Set menuEnt (getenv "EnterpriseMenuFile"))	; si aucun " . "&lt;BR /&gt;
	;(if (= MenuEnt " . ")&lt;BR /&gt;
	;	(setenv "EnterpriseMenuFile" "O:\\Acad\\Param\\Menu_entreprise\\TPS.cui")&lt;BR /&gt;
	;)&lt;BR /&gt;
)</description>
      <pubDate>Tue, 08 Jan 2008 08:00:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/modify-support-search-path-vba/m-p/2149449#M21837</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2008-01-08T08:00:38Z</dc:date>
    </item>
    <item>
      <title>Re: Modify Support Search Path- VBA</title>
      <link>https://forums.autodesk.com/t5/vba-forum/modify-support-search-path-vba/m-p/2149450#M21838</link>
      <description>This should give you everything you need. This function removes a path and replaces it with a new one within the search path semi-colon delimited string.&lt;BR /&gt;
&lt;BR /&gt;
Private Function spChange(oldPath As String, _&lt;BR /&gt;
newPath As String)&lt;BR /&gt;
Dim acadPref As AcadPreferencesFiles&lt;BR /&gt;
Dim pathAry() As String&lt;BR /&gt;
Dim oldStr As String, newStr As String&lt;BR /&gt;
Dim i As Integer&lt;BR /&gt;
&lt;BR /&gt;
Set acadPref = AcadApplication.Preferences.Files&lt;BR /&gt;
oldStr = acadPref.SupportPath&lt;BR /&gt;
pathAry = Split(oldPath, ";")&lt;BR /&gt;
&lt;BR /&gt;
For i = LBound(pathAry) To UBound(pathAry)&lt;BR /&gt;
If pathAry(i) = oldPath Then pathAry(i) = Trim(newPath)&lt;BR /&gt;
Next i&lt;BR /&gt;
&lt;BR /&gt;
For i = LBound(pathAry) To UBound(pathAry)&lt;BR /&gt;
newStr = Trim(newStr) &amp;amp; Trim(pathAry(i)) &amp;amp; ";"&lt;BR /&gt;
Next i&lt;BR /&gt;
&lt;BR /&gt;
newStr = Trim(Replace(Left(newStr, Len(newStr) - 1), ";;", ";"))&lt;BR /&gt;
acadPref.SupportPath = newStr&lt;BR /&gt;
&lt;BR /&gt;
Erase pathAry&lt;BR /&gt;
Set acadPref = Nothing&lt;BR /&gt;
&lt;BR /&gt;
End Function</description>
      <pubDate>Tue, 08 Jan 2008 15:22:06 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/modify-support-search-path-vba/m-p/2149450#M21838</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2008-01-08T15:22:06Z</dc:date>
    </item>
    <item>
      <title>Re: Modify Support Search Path- VBA</title>
      <link>https://forums.autodesk.com/t5/vba-forum/modify-support-search-path-vba/m-p/2149451#M21839</link>
      <description>I tried one similar after seeing pervious post and could not find anything &lt;BR /&gt;
to set a new item to the path, I could however get current settings&lt;BR /&gt;
&lt;BR /&gt;
I found this to get the string items&lt;BR /&gt;
&lt;BR /&gt;
Public Function GetSupportPaths() As Variant&lt;BR /&gt;
    Dim strPrefsFiles As String&lt;BR /&gt;
    strPrefsFiles = ThisDrawing.Application.preferences.Files&lt;BR /&gt;
    GetSupportPaths = Split(strPrefsFiles, ";")&lt;BR /&gt;
  End Function&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
I tried&lt;BR /&gt;
dim  addsupportPath as string&lt;BR /&gt;
addsupportPath = "c:\temp"&lt;BR /&gt;
preferences.Files.SupportPath = addSupportPath&lt;BR /&gt;
&lt;BR /&gt;
but that removed all the existing strings items and wrote on the &lt;BR /&gt;
addSupportPath string&lt;BR /&gt;
&lt;BR /&gt;
it was fun trying&lt;BR /&gt;
&lt;BR /&gt;
John&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;RSTRANDMARK&gt; wrote in message news:5814896@discussion.autodesk.com...&lt;BR /&gt;
This should give you everything you need. This function removes a path and &lt;BR /&gt;
replaces it with a new one within the search path semi-colon delimited &lt;BR /&gt;
string.&lt;BR /&gt;
&lt;BR /&gt;
Private Function spChange(oldPath As String, _&lt;BR /&gt;
newPath As String)&lt;BR /&gt;
Dim acadPref As AcadPreferencesFiles&lt;BR /&gt;
Dim pathAry() As String&lt;BR /&gt;
Dim oldStr As String, newStr As String&lt;BR /&gt;
Dim i As Integer&lt;BR /&gt;
&lt;BR /&gt;
Set acadPref = AcadApplication.Preferences.Files&lt;BR /&gt;
oldStr = acadPref.SupportPath&lt;BR /&gt;
pathAry = Split(oldPath, ";")&lt;BR /&gt;
&lt;BR /&gt;
For i = LBound(pathAry) To UBound(pathAry)&lt;BR /&gt;
If pathAry(i) = oldPath Then pathAry(i) = Trim(newPath)&lt;BR /&gt;
Next i&lt;BR /&gt;
&lt;BR /&gt;
For i = LBound(pathAry) To UBound(pathAry)&lt;BR /&gt;
newStr = Trim(newStr) &amp;amp; Trim(pathAry(i)) &amp;amp; ";"&lt;BR /&gt;
Next i&lt;BR /&gt;
&lt;BR /&gt;
newStr = Trim(Replace(Left(newStr, Len(newStr) - 1), ";;", ";"))&lt;BR /&gt;
acadPref.SupportPath = newStr&lt;BR /&gt;
&lt;BR /&gt;
Erase pathAry&lt;BR /&gt;
Set acadPref = Nothing&lt;BR /&gt;
&lt;BR /&gt;
End Function&lt;/RSTRANDMARK&gt;</description>
      <pubDate>Tue, 08 Jan 2008 21:15:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/modify-support-search-path-vba/m-p/2149451#M21839</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2008-01-08T21:15:11Z</dc:date>
    </item>
    <item>
      <title>Re: Modify Support Search Path- VBA</title>
      <link>https://forums.autodesk.com/t5/vba-forum/modify-support-search-path-vba/m-p/2149452#M21840</link>
      <description>All you need to know is in the function I gave you above.&lt;BR /&gt;
&lt;BR /&gt;
A few things that you may be misunderstanding:&lt;BR /&gt;
There is a "Support File Search Path" and a "Working File Search Path"&lt;BR /&gt;
&lt;BR /&gt;
When you ask for the search paths, it returns the "Working Support File Search Paths". When you set a new path, it writes to the "Support File Search Path". Having the program return the paths again will not show the newly added path because it doesn't exist therefore is not a "working" path. Take this example:&lt;BR /&gt;
&lt;BR /&gt;
'~~~START CODE&lt;BR /&gt;
Sub testss()&lt;BR /&gt;
Dim acadPref As AcadPreferencesFiles&lt;BR /&gt;
Dim oldPaths As String&lt;BR /&gt;
Dim newPath As String&lt;BR /&gt;
newPath = "C:\New Folder"&lt;BR /&gt;
Set acadPref = AcadApplication.Preferences.Files&lt;BR /&gt;
oldPaths = acadPref.SupportPath&lt;BR /&gt;
Debug.Print oldPaths&lt;BR /&gt;
newPath = oldPaths &amp;amp; ";" &amp;amp; newPath&lt;BR /&gt;
acadPref.SupportPath = newPath&lt;BR /&gt;
Debug.Print acadPref.SupportPath&lt;BR /&gt;
End Sub&lt;BR /&gt;
&lt;BR /&gt;
'~~~~END CODE&lt;BR /&gt;
&lt;BR /&gt;
If you run that, then look in your options dialog in AutoCAD, you will see that the path got added to the "Support File Search Path". You will also notice that the "Working File Search Path" does not contain the new path (assuming the path doesn't exist on your computer). So this does work, as I use it in a few applications.&lt;BR /&gt;
&lt;BR /&gt;
The VBA object model does not seem to expose the actual "Support File Search Path", it seems to only return the "Working File Search Path". I would imagine there are other ways to get the actual "Support File Search Path", such as the registry, but I am unaware of it.&lt;BR /&gt;
&lt;BR /&gt;
The only time this is a PITA, is if your network structure changes, and some working paths stop working and you run a program which changes these parameters. You may not get the intended result then.</description>
      <pubDate>Tue, 08 Jan 2008 22:15:29 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/modify-support-search-path-vba/m-p/2149452#M21840</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2008-01-08T22:15:29Z</dc:date>
    </item>
    <item>
      <title>Re: Modify Support Search Path- VBA</title>
      <link>https://forums.autodesk.com/t5/vba-forum/modify-support-search-path-vba/m-p/2149453#M21841</link>
      <description>rsstrqndmark,&lt;BR /&gt;
&lt;BR /&gt;
Thank you for the explanation, I'll try it a work today.&lt;BR /&gt;
&lt;BR /&gt;
John&lt;BR /&gt;
&lt;RSTRANDMARK&gt; wrote in message news:5815390@discussion.autodesk.com...&lt;BR /&gt;
All you need to know is in the function I gave you above.&lt;BR /&gt;
&lt;BR /&gt;
A few things that you may be misunderstanding:&lt;BR /&gt;
There is a "Support File Search Path" and a "Working File Search Path"&lt;BR /&gt;
&lt;BR /&gt;
When you ask for the search paths, it returns the "Working Support File &lt;BR /&gt;
Search Paths". When you set a new path, it writes to the "Support File &lt;BR /&gt;
Search Path". Having the program return the paths again will not show the &lt;BR /&gt;
newly added path because it doesn't exist therefore is not a "working" path. &lt;BR /&gt;
Take this example:&lt;BR /&gt;
&lt;BR /&gt;
'~~~START CODE&lt;BR /&gt;
Sub testss()&lt;BR /&gt;
Dim acadPref As AcadPreferencesFiles&lt;BR /&gt;
Dim oldPaths As String&lt;BR /&gt;
Dim newPath As String&lt;BR /&gt;
newPath = "C:\New Folder"&lt;BR /&gt;
Set acadPref = AcadApplication.Preferences.Files&lt;BR /&gt;
oldPaths = acadPref.SupportPath&lt;BR /&gt;
Debug.Print oldPaths&lt;BR /&gt;
newPath = oldPaths &amp;amp; ";" &amp;amp; newPath&lt;BR /&gt;
acadPref.SupportPath = newPath&lt;BR /&gt;
Debug.Print acadPref.SupportPath&lt;BR /&gt;
End Sub&lt;BR /&gt;
&lt;BR /&gt;
'~~~~END CODE&lt;BR /&gt;
&lt;BR /&gt;
If you run that, then look in your options dialog in AutoCAD, you will see &lt;BR /&gt;
that the path got added to the "Support File Search Path". You will also &lt;BR /&gt;
notice that the "Working File Search Path" does not contain the new path &lt;BR /&gt;
(assuming the path doesn't exist on your computer). So this does work, as I &lt;BR /&gt;
use it in a few applications.&lt;BR /&gt;
&lt;BR /&gt;
The VBA object model does not seem to expose the actual "Support File Search &lt;BR /&gt;
Path", it seems to only return the "Working File Search Path". I would &lt;BR /&gt;
imagine there are other ways to get the actual "Support File Search Path", &lt;BR /&gt;
such as the registry, but I am unaware of it.&lt;BR /&gt;
&lt;BR /&gt;
The only time this is a PITA, is if your network structure changes, and some &lt;BR /&gt;
working paths stop working and you run a program which changes these &lt;BR /&gt;
parameters. You may not get the intended result then.&lt;/RSTRANDMARK&gt;</description>
      <pubDate>Wed, 09 Jan 2008 11:32:23 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/modify-support-search-path-vba/m-p/2149453#M21841</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2008-01-09T11:32:23Z</dc:date>
    </item>
  </channel>
</rss>

