rsstrqndmark,
Thank you for the explanation, I'll try it a work today.
John
wrote in message news:5815390@discussion.autodesk.com...
All you need to know is in the function I gave you above.
A few things that you may be misunderstanding:
There is a "Support File Search Path" and a "Working File Search Path"
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:
'~~~START CODE
Sub testss()
Dim acadPref As AcadPreferencesFiles
Dim oldPaths As String
Dim newPath As String
newPath = "C:\New Folder"
Set acadPref = AcadApplication.Preferences.Files
oldPaths = acadPref.SupportPath
Debug.Print oldPaths
newPath = oldPaths & ";" & newPath
acadPref.SupportPath = newPath
Debug.Print acadPref.SupportPath
End Sub
'~~~~END CODE
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.
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.
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.