这是我的想法,但我也在考虑这是一个可以使用一次还是多次的程序
这是我的基础:
-
- Sub GeneratePreview()
- Dim CurrentDwg As AcadDocument
- Dim File As Variant
- Dim Folder As String
- ThisDrawing.SetVariable "Acadlspasdoc", 0
- 'the ReturnFolder command is externally defined and pops up a window alowing the user to browse for a folder
- Folder = ReturnFolder.ReturnFolder("File location to generate previews: ")
- File = Dir(Folder & "\*.DWG")
- While File ""
- Set CurrentDwg = Application.Documents.Open(Folder & "" & File)
- CurrentDwg.Activate
- Application.ZoomExtents
- CurrentDwg.Close True
- Set CurrentDwg = Nothing
- File = Dir
- Wend
- ThisDrawing.SetVariable "Acadlspasdoc", 1
- End Sub
我现在正在考虑一种打开子文件夹及其图形的方法,尽管当时我并不担心
随着我的进步,我将发布更多信息。 |