Message 1 of 11
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I have some DWG files that I can not get to open with the following code to process them as some batch operation, these files were exported from Solid Works and are not real DWG files. can I open them in some other way to get simple batch operations to work with non Autodesk DWG files?
<CommandMethod("Batch")> Public Sub bathcfiles()
Dim acDialog As New System.Windows.Forms.OpenFileDialog
acDialog.Multiselect = True
If acDialog.ShowDialog = System.Windows.Forms.DialogResult.OK Then
For Each i As String In acDialog.FileNames
Dim acDocMgr As DocumentCollection = Application.DocumentManager
Dim acDoc As Document = acDocMgr.Open(i, True)
' do something with the file
acDoc.CloseAndDiscard()
Next
End If
End Sub
Solved! Go to Solution.