dbroada Posted May 8, 2013 Share Posted May 8, 2013 I feel a bit of a fraud as this is the sort of thing I should be able to myself however I'm lazy/busy today so wonder if somebody could do it for me/has something already. I would like a LISP or similar that could run through a given directory and output to a text file the drawing name and the ACXXXX version number. We have some drawings that are not being saved correctly and I would like to identify where they are before I batch change everything to the correct version. TIA Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted May 8, 2013 Share Posted May 8, 2013 Hi Dave, Try this: (defun c:dwgver ( / des dir lst out vrs ) (if (setq dir (LM:browseforfolder "" nil 512)) (if (setq lst (vl-directory-files dir "*.dwg" 1)) (if (and (setq out (vl-filename-mktemp "ver" (getvar 'dwgprefix) ".txt")) (setq des (open out "w")) ) (progn (foreach dwg lst (if (setq vrs (LM:dwgversion (setq dwg (strcat dir "\\" dwg)))) (write-line (strcat dwg "\t" vrs) des) (write-line (strcat dwg "\tUnknown") des) ) ) (close des) (startapp "notepad" out) ) (princ "\nUnable to create Output file.") ) (princ "\nNo Drawings found in selected directory.") ) (princ "\n*Cancel*") ) (princ) ) (vl-load-com) (princ) The above requires the following functions to be loaded: Browse for Folder Drawing Version Quote Link to comment Share on other sites More sharing options...
dbroada Posted May 8, 2013 Author Share Posted May 8, 2013 Thanks Lee, I'll test in a minute. I was hoping you were still around. Quote Link to comment Share on other sites More sharing options...
dbroada Posted May 8, 2013 Author Share Posted May 8, 2013 Excellent as usual Lee. It looks like I have to "convert" 80% back to 2010. Might as well do the lot..... Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted May 8, 2013 Share Posted May 8, 2013 You're welcome Dave; luckily most of the code was already written Quote Link to comment Share on other sites More sharing options...
marvs_tadifa Posted June 10, 2015 Share Posted June 10, 2015 Hi..can i ask you knowledge regarding LISP command. please.. i want to learn. thanks Quote Link to comment Share on other sites More sharing options...
nod684 Posted June 11, 2015 Share Posted June 11, 2015 thanks a lot for sharing Lee! this will be very beneficial Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted June 11, 2015 Share Posted June 11, 2015 Hi..can i ask you knowledge regarding LISP command. please.. i want to learn. thanks Ask away - but if your question is not related to the topic of this thread, then it belongs in a new thread. thanks a lot for sharing Lee!this will be very beneficial You're most welcome! I'm delighted that others can make use of it Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.