这就是我如何确保这些驱动器在路径中的方法。
- Public Sub ACADStartup()
- Set AutoCAD = Application
- Dim strUSER As String
- Dim supppath As String
- supppath = UCase(ThisDrawing.Application.Preferences.Files.SupportPath)
- 'This will prevent you entering the same entry more than once
- If InStr(1, supppath, "U:\TITLEBLOCKS") > 1 Then
- GoTo Nextline
- Else
- ThisDrawing.Application.Preferences.Files.SupportPath = supppath & ";" & "U:\TITLEBLOCKS"
- End If
- Nextline:
- If InStr(1, supppath, "U:\symbols") > 1 Then
- GoTo Lastline
- Else
- ThisDrawing.Application.Preferences.Files.SupportPath = supppath & ";" & "U:\symbols"
- End If
- Lastline:
- If InStr(1, supppath, "U:\PROJECTLOGS") > 1 Then
- Exit Sub
- Else
- ThisDrawing.Application.Preferences.Files.SupportPath = supppath & ";" & "U:\PROJECTLOGS"
- End If
- Exit Sub
- End Sub
|