支持文件搜索路径
vba可以用于定义新的支持文件搜索路径吗?是的,你想做什么? 这就是我如何确保这些驱动器在路径中
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
我想使用VBA插入dwg,但如果它';s不在定义的路径中,vba阻塞,因为它可以#039;找不到块,所以我需要能够定义新路径。 使用上述内容,您应该能够添加路径 ;如果你需要帮助,请告诉我 成功了,谢谢。 你用的是什么版本?本人';我们已经看到一些报告,2007年InsertBlock现在需要一个完全限定的路径名。因此,仅仅确保支持路径指向您的区块是行不通的;请注意,我没有亲自测试过这一点。(请注意,今天晚些时候进行测试) 2005年adt JM,我这边没有确认,但我昨天在插入块时遇到了问题 ;今天必须调查一下。
页:
[1]