Jump to content

Recommended Posts

Posted

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.

Posted

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 :)

Posted

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.

Posted

Thanks Lee and Alan.. that command was escaping me last night

Posted

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.

Posted
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))
      )
 )

Posted

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 >.

Posted

I forgot to mention, the xcopy routine I posted, will copy all subdirectories.

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...