Message 1 of 4

Not applicable
09-08-2016
02:49 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I found this code while searching online, but I need to be able to pick a new directory folder each time I run the lisp. It would preferably open a file navigation dialog box, so I could browse to the desired folder. Anyone have ideas? Please and thank you!
(defun c:IDXFS (/ directory files)
(setq directory "C:\\MyFile\\DXFs")
(if (setq files (vl-directory-files directory "*.dxf" 1))
(foreach dxf files
(command "_.-insert"
(strcat directory "\\" dxf)
'(0. 0. 0.)
""
""
""
)
)
(princ "\n No DXF files found into that folder !")
)
(princ)
)
Solved! Go to Solution.