支持文件搜索路径
我有一个自定义的VB系统安装在许多机器上,需要添加到几个更多。最大限度地利用时间是将所有子目录添加到“选项”对话框中的“支持文件搜索路径”列表中。有没有办法自动完成这项工作,或者有没有可以读取的文件来节省我的时间?
如有任何见解,将不胜感激。
拍打 您可以将整个配置文件从一台机器导出到共享驱动器,然后将其导入其他机器。这当然会打乱每个用户所做的任何更改,但我认为你不能只导入一个选项卡。我们过去在这里讨论过这个问题,我认为有人想出了一个解决方案,但它涉及从注册表导出,所以我更喜欢打乱其他绘图员。 我提出了一个程序解决方案。
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"
ADD AS MANY LINES AS YOU LIKE TO THE ARRAY
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
使用Autocad外部的VBScript,这是最快的。如果你需要的话,我可以举个例子
页:
[1]