我提出了一个程序解决方案。
- 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
|