这在我的机器上工作 ;也就是说,在调试时,我崩溃了AUTOCAD 3次,因为文件夹没有';它不存在,对此感到不安 ;话虽如此,但要预先警告 ;无论如何,这里有一个模块,它可以实现您想要的功能
- Public Sub CustomPLotStyles()
- Dim strUser As String, path As String
- strUser = UCase(Environ("USERNAME"))
- path = "C:\Documents and Settings" & strUser & "\Application Data\Autodesk\AutoCAD 2007\R17.0\enu\Plot Styles"
- If ThisDrawing.Application.Preferences.Files.PrinterStyleSheetPath = "C:\Custom Plot Styles" Then
- ThisDrawing.Application.Preferences.Files.PrinterStyleSheetPath = path
- Else
- ThisDrawing.Application.Preferences.Files.PrinterStyleSheetPath = "C:\Custom Plot Styles"
- End If
- End Sub
|