Jump to content

Creating a batch file to run dwg to dxf scripts


romzak

Recommended Posts

I've created a script which converts a drawing from .dwg format to .dxf format. (not lsp..more like the dxfout utility). I have scores of maps to do the conversion on. Each map has its own scr file associated with it. I have no experience with writing batch files, and am looking for a way to run these under a batch. I appreciate any help.

gerry

Link to comment
Share on other sites

Thanks...but scriptpro is too cumbersome given that it needs to open autocad, then shut down for each run of the script. This would require letting it run all night long.

Link to comment
Share on other sites

I crate a list of files using the DOS command

 

dir *.dwg /b > list.txt

 

but you may have your own way to create a plain list. Open that in excel and using find|replace and by copying columns you can end up with a list of files like this....

 

open drawing1.dwg dxfout
open drawing2.dwg dxfout
open drawing3.dwg dxfout

now save it as a plain text file named list.scr and you can run it as a script.

if you have to run a seperate script for each drawing this won't be the best solution though as you cannot get a script to call a second script and then return from where you left. If all your scripts are identical you can put each step in where I have put dxfout.

Link to comment
Share on other sites

  • 1 month later...

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