Need help testing and improving my lisp
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi guys,
Attached you will find my MFT.lsp, which stands for "Multiple Filehandling Tool"
It allows to select files (*.dwg / *.dxf), in pretty much any way thinkable.
& to suply a lisp (*.lsp) to be loaded and/or commands to be executed, on each file.
MFT Main dialog
The idea is to share this with anybody who needs to process multiple DWG's (or DXF's).
& Its supposed to work on any version of ACAD, in combination with DOSlib.
...but I can only test it on 2014 (64bit) & 2015 (64bit)
...and the code can surely be improved in many ways. (which comes with a ton of comments)
& thats what I need you guys for.
Any version you can test it on, any bug you find, any improvement you can make, any suggestion you have: Bring it on! (& make this a tool everybody wants )
Note: the command part is an addition I stuck in recently and still need to work out a bit.
The idea was to create a script & load that with each drawing, but that doesn't work.
So I changed it to an (eval ...), which works with the example you see inside the screenshot above, but I didn't yet test it with multiple lines and/or script like commands (e.g: "Zoom e" instead of "(command "zoom" "e")")
I might just reduce the option to a single line of code, if it turns out to difficult to allow for more. (& if you put 'garbage' in, you will get garbage out during processing, so be carefull with that option)
It comes with a ini file & dcl for the main dialog.
I've used "C:/Lisp/MFT/" to put the files in & it uses a subdirectory "DATA" for saving a list of files and a .scr file to hold the commands. It doesn't check or create it, so if not there, nothing will be saved/loaded for those two files/options.
You should be able to put it anywhere, just edit the path inside the .lsp INIT section
(setq MFT_files "c:/Lisp/MFT/")
Where you might also set a path to find DOSlib. (It will try to find it within support path first)
(setq DLpath "C:/Lisp/DOSLIB/")