Creation of a vb.net multiselect file dialog that can be exposed to lisp is straightforward.
I am partial to using .net to expanding the power of lisp...
Although you can't beat LISP for fast coding.
P=
Code:
Imports Autodesk.AutoCAD
Imports Autodesk.AutoCAD.Runtime
Imports Autodesk.AutoCAD.EditorInput
Imports Autodesk.AutoCAD.DatabaseServices
Imports Autodesk.AutoCAD.Geometry
Imports Autodesk.AutoCAD.Colors
Imports Autodesk.AutoCAD.ApplicationServices
Imports Autodesk.AutoCAD.Windows
Imports System.Windows.Forms
Imports System.Runtime.InteropServices 'for DllImport()
Imports System.Text ' for StringBuilder
Public Class VB2LISPClass
' (vbvl:MultipleOpenFileDialog "Title" "c:\\acad" "312vg.dwg" "(*.dwg)|*.dwg|All files (*.*)|*.*")
<LispFunction("vbvl:MultipleOpenFileDialog")> _
Public Function dotNetGetFile1(ByVal rbfArguments As ResultBuffer)
Dim arrResult() As String
Dim objResult As ResultBuffer = rbfArguments
Dim objFileDialog As New System.Windows.Forms.OpenFileDialog
Dim tpvReturn As TypedValue = New TypedValue(LispDataType.Nil, -1)
Try
Dim arrArguments As TypedValue() = rbfArguments.AsArray()
' Get the ObjectId passed in from LISP function
If arrArguments.Length >= 3 And _
arrArguments(0).TypeCode = LispDataType.Text And _
arrArguments(1).TypeCode = LispDataType.Text And _
arrArguments(2).TypeCode = LispDataType.Text Then
With objFileDialog
.Title = arrArguments(0).Value.ToString
.InitialDirectory = arrArguments(1).Value.ToString
.FileName = arrArguments(2).Value.ToString
If arrArguments.Length > 3 Then
If arrArguments(3).Value.ToString <> "" Then
MsgBox(arrArguments(3).Value.ToString)
.FilterIndex = 1
.Filter = arrArguments(3).Value.ToString
End If
End If
.Multiselect = True
If .ShowDialog() = DialogResult.OK Then
ReDim arrResult(.FileNames.Length - 1)
arrResult = .FileNames
objResult = New ResultBuffer(New TypedValue(CInt(5005), arrResult(0).ToString))
For intItem2 As Integer = 1 To arrResult.Length - 1
objResult.Add(New TypedValue(CInt(5005), arrResult(intItem2).ToString))
Next intItem2
Return objResult
Else
Return tpvReturn
End If
End With
End If
Catch ex As System.Exception
System.Diagnostics.Debug.Write(ex.ToString())
Return tpvReturn
End Try
Return tpvReturn
End Function
End Class