I do not believe that GetFileNameForOpen will allow multiples, but you can use something like this.
{code}
Public Function CadOpen(ByVal title As String, ByVal defName As String, ByVal ext As String, _
ByVal flags As Autodesk.AutoCAD.Windows.OpenFileDialog.OpenFileDialogFlags) As String()
Dim OpenDia As New Autodesk.AutoCAD.Windows.OpenFileDialog(title, defName, ext, "", flags)
Try
Dim res As Windows.Forms.DialogResult = OpenDia.ShowDialog
If res <> Windows.Forms.DialogResult.OK Then Return Nothing
Dim Filenames() As String = OpenDia.GetFilenames
If Filenames.Length = 0 Then Return Nothing
Return Filenames
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.Information, "Error Getting Filenames")
Return Nothing
End Try
End Function
{code}
Then call it like this:
Dim Filenames() As String = CadOpen("Select Files for Data Extraction:", "", "dwg", _
Autodesk.AutoCAD.Windows.OpenFileDialog.OpenFileDialogFlags.AllowMultiple)
Check to make sure Filenames is not Nothing before using the names.
Dave O.