deegeecees 发表于 2006-10-25 13:32:04

ADT2005 w/SP2

deegeecees 发表于 2006-10-25 13:32:26

如果导出个人资料,则会将其保存在个人资料中。您需要做的是设置一个变量并附加到它。

Matersammichman 发表于 2006-10-25 13:32:47

以下是执行所需操作的代码
Public Sub ACADStartup()
    Dim supppath As String
    supppath = UCase(ThisDrawing.Application.Preferences.Files.SupportPath)
    'This will prevent you entering the same entry more than once
    If Not (InStr(1, supppath, "U:\TITLEBLOCKS") > 1) Then
      ThisDrawing.Application.Preferences.Files.SupportPath = supppath & ";" & "U:\TITLEBLOCKS"
    End If
    supppath = UCase(ThisDrawing.Application.Preferences.Files.SupportPath)
    If Not (InStr(1, supppath, "U:\SYMBOLS") > 1) Then
      ThisDrawing.Application.Preferences.Files.SupportPath = supppath & ";" & "U:\SYMBOLS"
    End If
    supppath = UCase(ThisDrawing.Application.Preferences.Files.SupportPath)
    If Not (InStr(1, supppath, "U:\PROJECTLOGS") > 1) Then
      ThisDrawing.Application.Preferences.Files.SupportPath = supppath & ";" & "U:\PROJECTLOGS"
    End If
    Exit Sub
End Sub

Matersammichman 发表于 2006-10-25 13:33:58

我设置 supppath = 支持路径,然后使用
supppath & “;” & “path im adding” 进行追加

deegeecees 发表于 2006-10-25 13:34:18

嗯,
*从头开始*
我在那里迷路了,我2002年的个人资料保存了支持路径
Public Sub ACADStartup()
    Dim supppath As String
    supppath = UCase(ThisDrawing.Application.Preferences.Files.SupportPath)
    'This will prevent you entering the same entry more than once
    If Not (InStr(1, supppath, "U:\TITLEBLOCKS") > 1) Then
      ThisDrawing.Application.Preferences.Files.SupportPath = supppath & ";" & "U:\TITLEBLOCKS"
    End If
    supppath = UCase(ThisDrawing.Application.Preferences.Files.SupportPath)
    If Not (InStr(1, supppath, "U:\SYMBOLS") > 1) Then
      ThisDrawing.Application.Preferences.Files.SupportPath = supppath & ";" & "U:\SYMBOLS"
    End If
    supppath = UCase(ThisDrawing.Application.Preferences.Files.SupportPath)
    If Not (InStr(1, supppath, "U:\PROJECTLOGS") > 1) Then
      ThisDrawing.Application.Preferences.Files.SupportPath = supppath & ";" & "U:\PROJECTLOGS"
    End If
    Exit Sub
End Sub
页: 1 [2]
查看完整版本: 支持文件搜索路径