TheSwamp
Code Red => AutoLISP (Vanilla / Visual) => Topic started by: Guest on July 18, 2007, 09:52:55 AM
-
Is there a VLisp command for selecting mutliple files, similar to vl-directory-files?
-
Can you use it in a sentence? :-P
Sorry, I mean how would you use it?
-
Not sure I know what you mean, but perhaps dcl_MultiFileDialog.
{ shrugs }
-
I use a function from Robert McNeel's DOSLIB functions HERE (http://www.en.na.mcneel.com/doslib.htm)
Looks sorta like this:(dos_getfilem "Select File" (getvar "DWGPREFIX") "Drawing Files (*.DWG)|*.DWG")
I'm sure someone here can code up a lispy replacement, I think I saw one somewhere.
-
I use a function from Robert McNeel's DOSLIB functions HERE (http://www.en.na.mcneel.com/doslib.htm)
Looks sorta like this:(dos_getfilem "Select File" (getvar "DWGPREFIX") "Drawing Files (*.DWG)|*.DWG")
I'm sure someone here can code up a lispy replacement, I think I saw one somewhere.
That's what I was looking for.
Thanks!
*I was just thumbing throw the DosLib help. Wonder how I missed that one. :?*
-
Not sure I know what you mean, but perhaps dcl_MultiFileDialog.
Is that equivalent to the doslib function dos_getfilem?
-
I use a function from Robert McNeel's DOSLIB functions HERE (http://www.en.na.mcneel.com/doslib.htm)
Looks sorta like this:(dos_getfilem "Select File" (getvar "DWGPREFIX") "Drawing Files (*.DWG)|*.DWG")
I'm sure someone here can code up a lispy replacement, I think I saw one somewhere.
That's what I was looking for.
Thanks!
*I was just thumbing throw the DosLib help. Wonder how I missed that one. :?*
I use it to XREF a couple dozen files all at once, it's one of my fav's.
-
I use it to XREF a couple dozen files all at once, it's one of my fav's.
What version of ACAD are you running? You can xref multiple files at once in '07 and '08. I think you could even do it back in '05, but I'm not 100% sure about that.
-
Not sure I know what you mean, but perhaps dcl_MultiFileDialog.
Is that equivalent to the doslib function dos_getfilem?
Yep. I wouldn't have suggested it but I was under the impression you were already using OpenDCL, so it's already at your disposal.
Examples:
(dcl_MultiFileDialog
(list
"Drawings (*.dwg)|*.dwg"
"Templates (*.dwt)|*.dwt"
)
"Select the drawings(s):"
"c:\\"
)
Or ...
(dcl_MultiFileDialog
(list "Drawings (*.dwg,*.dwt)|*.dwg;*.dwt")
"Select the drawings(s):"
"c:\\"
)
:)
-
Not sure I know what you mean, but perhaps dcl_MultiFileDialog.
Is that equivalent to the doslib function dos_getfilem?
Yep. I wouldn't have suggested it but I was under the impression you were already using OpenDCL, so it's already at your disposal.
Examples:
(dcl_MultiFileDialog
(list
"Drawings (*.dwg)|*.dwg"
"Templates (*.dwt)|*.dwt"
)
"Select the drawings(s):"
"c:\\"
)
Or ...
(dcl_MultiFileDialog
(list "Drawings (*.dwg,*.dwt)|*.dwg;*.dwt")
"Select the drawings(s):"
"c:\\"
)
:)
Do you have to add the FILE DIALOG BOX to the project?
-
I use it to XREF a couple dozen files all at once, it's one of my fav's.
What version of ACAD are you running? You can xref multiple files at once in '07 and '08. I think you could even do it back in '05, but I'm not 100% sure about that.
About half our staff is still running R2002 <edit> and dcl_MultiFileDialog is not available.
-
Do you have to add the FILE DIALOG BOX to the project?
No -- dcl_MultiFileDialog is a self reliant bonus function included in the OpenDCL arx run time.
PS: If you're using an older version of Object/OpenDCL the function would be named odcl_MultiFileDialog.
:)
-
Do you have to add the FILE DIALOG BOX to the project?
No -- dcl_MultiFileDialog is a self reliant bonus function included in the OpenDCL arx run time.
PS: If you're using an older version of Object/OpenDCL the function would be named odcl_MultiFileDialog.
:)
Ahh cool, thanks, I'll look.
-
And as a last resource, or if one of these days.... here is the C# alternative
[CommandMethod("GETMFILES")]
public void getmfiles()
{
OpenFileDialog dlg = new OpenFileDialog("Title: Open Drawings", "", "dwg", "Your Dialog Name", OpenFileDialog.OpenFileDialogFlags.AllowMultiple);
if (dlg.ShowDialog() != System.Windows.Forms.DialogResult.OK) return;
string[] files = dlg.GetFilenames();
foreach (string f in files)
{
//do your stuff here
}
}
-
Not sure I know what you mean, but perhaps dcl_MultiFileDialog.
Is that equivalent to the doslib function dos_getfilem?
Yep. I wouldn't have suggested it but I was under the impression you were already using OpenDCL, so it's already at your disposal.
Nice! Screen shot please. :-)
-
Nice! Screen shot please. :-)
(http://www.theswamp.org/screens/mp/dcl_mutifiledialog.png)
AutoCAD 2008 / OpenDCL 4.0 RC3 / Vista Ultra / Medium icon mode.
{ reduced colors to 256 after screen grab, it looks richer than this actually }
-
Another piccy, same specs as before except detail view with multiple files selected ...
(http://www.theswamp.org/screens/mp/dcl_mutifiledialog2.png)
-
About half our staff is still running R2002
I have not read anywhere if it is going to be available for pre - 2004 AutoCAD versions.... maybe it will - the arx binaries I have seen are for 2004-2008
-
About half our staff is still running R2002
I have not read anywhere if it is going to be available for pre - 2004 AutoCAD versions.... maybe it will - the arx binaries I have seen are for 2004-2008
By the end of the year we hope to be fully embedded with R2008
-
By the end of the year we hope to be fully embedded with R2008
That it is going to be good! - I just started with a2007 jumping from a2005, have my copy of a2008 and do not know when I am going to start with that.... :-(
Note to the people from OpenDCL... Where is the information about what AutoCAD and verticals products OpenDCL will be supporting? - Thank you - in the mean time I'll go and check their new site.
-
Note to the people from OpenDCL... Where is the information about what AutoCAD and verticals products OpenDCL will be supporting? - Thank you - in the mean time I'll go and check their new site.
http://www.opendcl.com/HelpFiles/main.html
-
Note to the people from OpenDCL... Where is the information about what AutoCAD and verticals products OpenDCL will be supporting? - Thank you - in the mean time I'll go and check their new site.
http://www.opendcl.com/HelpFiles/main.html
Perfect! thanks.