Hudson Posted September 12, 2009 Posted September 12, 2009 I'm a little lost on this one. OpenDCL has opened my eyes more than I probably wished the could be opened.. and I'm now wondering how I can make directories etc. What's the best way to go about this? Thanks for any and all input. Quote
Lee Mac Posted September 12, 2009 Posted September 12, 2009 Not sure about OpenDCL, as tbh, I've never used it - only the Standard DCL provided with ACAD. But look into the vl-mkdir function Quote
alanjt Posted September 12, 2009 Posted September 12, 2009 OpenDCL is a dialog interface, picking up where standard DCL left off. The only addon I can think of, that adds additional commands to AutoCAD, is DosLib. However, for directory creation, Lee is exactly right, vl-mkdir is the ticket. Quote
Hudson Posted September 12, 2009 Author Posted September 12, 2009 Thanks Lee and Alan.. that command was escaping me last night Quote
Freerefill Posted September 12, 2009 Posted September 12, 2009 If you're making directories, you might also be managing files. The "shell" command allows you to essentially use the AutoCAD command line like the Windows command prompt. I was able to make directories and move a copy of two different files into each directory, and then rename all 125 of them using LISP. Just keep that in mind if you need a lot of batch file manipulation. For more information, open up the Windows command prompt and type "Help". All of those commands are available using LISP. Quote
alanjt Posted September 12, 2009 Posted September 12, 2009 If you're making directories, you might also be managing files. The "shell" command allows you to essentially use the AutoCAD command line like the Windows command prompt. I was able to make directories and move a copy of two different files into each directory, and then rename all 125 of them using LISP. Just keep that in mind if you need a lot of batch file manipulation. For more information, open up the Windows command prompt and type "Help". All of those commands are available using LISP. That's an interesting thought. I've copied files through lisp, but it was never many and if it was a directory, I just used a (foreach x (cddr (vl-directory-files SourceDirectory) (vl-file-copy but this will not copy sub directories. XCopy would be a nice tool. You could call it with something like: (defun CopyDirectory (#Source #Destination) (and (findfile #Source) (startapp (strcat "xcopy " #Source " /E /H /Q /Y /I " #Destination)) ) ) Quote
Hudson Posted September 13, 2009 Author Posted September 13, 2009 Thanks guys.. this forum is great Quote
Freerefill Posted September 13, 2009 Posted September 13, 2009 I was never very good at .bat files, but once I discovered you can do most of the work of a .bat file through Visual LISP, I realized just how powerful it was. Now if only I could get good enough at C++ to create a GUI which runs on C++ and LISP, as well as a LISP editor that functions the same as the Visual LISP one.. man, I'd have silly amounts of fun making all sorts of programs without having to use AutoCAD >. Quote
alanjt Posted September 13, 2009 Posted September 13, 2009 I forgot to mention, the xcopy routine I posted, will copy all subdirectories. Quote
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.