mcguirepm Posted January 23, 2009 Posted January 23, 2009 I have a customized VB system installed on many machine and need to add it to several more. The largest use of time is adding all of the subdirectories to the 'Support File Search Path' lists in the Options dialog. Is there a way to do this automatically or is there a file this can be read from to save me time? Any insights would be appreciated. Pat Quote
dbroada Posted January 23, 2009 Posted January 23, 2009 you can export the whole profile from one machine to a shared drive then import it into the others. This will of course upset any changes the individual users have made but I don't think you can just import one tab. We have discussed this on here in the past and I think somebody came up with a solution but it involved exporting from the registry so I prefer to upset the other draughtsmen. Quote
mcguirepm Posted January 23, 2009 Author Posted January 23, 2009 I have come up with a programatic solution. Public Sub Init_Setup() ' This routine adds all of the Support File Search Paths Dim preferences As AcadPreferences Dim currSupportPath As String Dim newSupportPath() As String newSupportPath(0) = "C:\Program Files\GPTOOLBOX\" newSupportPath(1) = "C:\Program Files\GPTOOLBOX\Blocks" [color=red]ADD AS MANY LINES AS YOU LIKE TO THE ARRAY[/color] Set preferences = ThisDrawing.Application.preferences ' Retrieve the current SupportPath value currSupportPath = preferences.Files.SupportPath ' Check for each value in the SupportPath For i = 0 To UBound(newSupportPath) If InStr(UCase(currSupportPath), UCase(newSupportPath(i))) = 0 Then currSupportPath = currSupportPath & ";" & newSupportPath(i) MsgBox newSupportPath(i) & " added." End If Next i MsgBox "The SupportPath value has been set to " & currSupportPath, vbInformation, "SupportPath Example" End Sub Quote
CmdrDuh Posted January 23, 2009 Posted January 23, 2009 use a VBScript from outside Autocad, thats the fastest. I can post an example if you need Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.