.NET
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
How to set multiple file extension of the OpenFileDi alg?
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
385 Views, 4 Replies
03-09-2007 08:52 PM
I can set the single file extension for Autodesk.AutoCAD.Windows.OpenFileDialg like this:
Autodesk.AutoCAD.Windows.OpenFileDialg dlg = new Autodesk.AutoCAD.Windows.OpenFileDialog("select files", null, "dwg", null, Autodesk.AutoCAD.Windows.OpenFileDialog.OpenFileDi alogFlags.AllowMultiple);
But how to set set multiple file extension?
I have tried "dwg|dxf",but it does not work.
Autodesk.AutoCAD.Windows.OpenFileDialg dlg = new Autodesk.AutoCAD.Windows.OpenFileDialog("select files", null, "dwg", null, Autodesk.AutoCAD.Windows.OpenFileDialog.OpenFileDi
But how to set set multiple file extension?
I have tried "dwg|dxf",but it does not work.
Re: How to set multiple file extension of the OpenFileDi alg?
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
03-09-2007 11:13 PM in reply to:
csharpbird
Hello,
Give it a try......
OpenFileDialog Ofn = new OpenFileDialog();
Ofn.Filter = "C Sharp Files (*.cs)|*.cs|Text Files (*.txt)|*.txt";
Ofn.Title = "Type File";
Ofn.Multiselect = true;
Ofn.ShowDialog();
Best Regards,
Basha
Give it a try......
OpenFileDialog Ofn = new OpenFileDialog();
Ofn.Filter = "C Sharp Files (*.cs)|*.cs|Text Files (*.txt)|*.txt";
Ofn.Title = "Type File";
Ofn.Multiselect = true;
Ofn.ShowDialog();
Best Regards,
Basha
*Kerry Brown
Re: How to set multiple file extension of the OpenFileDi alg?
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
03-10-2007 12:28 AM in reply to:
csharpbird
For Multiple file extension options as you indicate, you could use :-
// using SWF = System.Windows.Forms;
// --
SWF.OpenFileDialog dlg = new SWF.OpenFileDialog();
dlg.Filter = "Drawing Based Files (*.dwg, *.dxf)|*.dwg;*.dxf";
dlg.Multiselect = true;
//kwb
wrote in message news:5514377@discussion.autodesk.com...
I can set the single file extension for
Autodesk.AutoCAD.Windows.OpenFileDialg like this:
Autodesk.AutoCAD.Windows.OpenFileDialg dlg = new
Autodesk.AutoCAD.Windows.OpenFileDialog("select files", null, "dwg", null,
Autodesk.AutoCAD.Windows.OpenFileDialog.OpenFileDi alogFlags.AllowMultiple);
But how to set set multiple file extension?
I have tried "dwg|dxf",but it does not work.
// using SWF = System.Windows.Forms;
// --
SWF.OpenFileDialog dlg = new SWF.OpenFileDialog();
dlg.Filter = "Drawing Based Files (*.dwg, *.dxf)|*.dwg;*.dxf";
dlg.Multiselect = true;
//kwb
I can set the single file extension for
Autodesk.AutoCAD.Windows.OpenFileDialg like this:
Autodesk.AutoCAD.Windows.OpenFileDialg dlg = new
Autodesk.AutoCAD.Windows.OpenFileDialog("select files", null, "dwg", null,
Autodesk.AutoCAD.Windows.OpenFileDialog.OpenFileDi
But how to set set multiple file extension?
I have tried "dwg|dxf",but it does not work.
Re: How to set multiple file extension of the OpenFileDi alg?
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
03-10-2007 04:56 PM in reply to:
csharpbird
If you're using OpenFileDialog from Autocad, separate the extensions with semicolons eg. "dwg;dwt"
Re: How to set multiple file extension of the OpenFileDi alg?
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
05-23-2011 08:12 AM in reply to:
GlennR
For example
Dim dlg As Autodesk.AutoCAD.Windows.OpenFileDialog = New Autodesk.AutoCAD.Windows.OpenFileDialog("Open Dat Files", "", "dat", "", 0)
Works like a Champ

