Here is one that has been bugging me for some time.
I am trying to use the AutoDESK Open File Dialogbox to open files.
But when I try to force the location it never goes to the specified path.
Have I lost the plot here and done some thing wrong... or is it a bug!
Dim sPath As String = My.Computer.FileSystem.SpecialDirectories.MyDocuments
Dim sTypes As String = "dwg; dwf; *"
Try
Dim flags As Autodesk.AutoCAD.Windows.OpenFileDialog.OpenFileDialogFlags = Autodesk.AutoCAD.Windows.OpenFileDialog.OpenFileDialogFlags.ForceDefaultFolder
If System.IO.Directory.Exists(sPath) = False Then
sPath = Global.My.Computer.FileSystem.SpecialDirectories.MyDocuments
End If
Dim ofd As New Autodesk.AutoCAD.Windows.OpenFileDialog("", sPath, sTypes, "SelectFileTest", flags)
Dim dr As System.Windows.Forms.DialogResult = ofd.ShowDialog()
If dr = System.Windows.Forms.DialogResult.OK Then
txtExternalFile.Text = ofd.Filename
Else
txtExternalFile.Text = Nothing
End If
Catch ex As Exception
txtExternalFile.Text = Nothing
End Try
edit:kdub :-> formatting code=vb.net