Jump to content

create batch file to run script ?


mostafa badran

Recommended Posts

You really should look at a batch program they are inexpensive and can make the cost back in one job, at least then all you have to worry about is the actual script to make the changes. Our program Multi-Batch can do this and a lot more. It gives you the power of AutoCAD's full version utility ScriptPro in a much easier to understand and use package.

 

There are other products on the market as well so check them out, the time saving can be significant.

 

Patrick

http://www.multi-batch.com/

For your entire batch processing needs

Link to comment
Share on other sites

  • 2 years later...
  • Replies 24
  • Created
  • Last Reply

Top Posters In This Topic

  • mostafa badran

    10

  • Tuns

    6

  • ReMark

    2

  • MSasu

    2

Top Posters In This Topic

Posted Images

What would be the best way to do the following?

I have a folder with CAD files. I need to run a program, lisp, something that will take all those cad files and append a layer modifier, and change the Lineweight.

 

I am completely clueless when it comes to this kind of hardcore programming. Any help, and I would be eternally grateful!

 

-Charles

Link to comment
Share on other sites

A simple script may do it for you, more info required to write the laychanger.lsp

 

Creating you initial text file is easy go to in Windows Start CMD a window opens, this is an example commands in bold

E: my network drive

cd\project\56\mechanical ths is your dwg directory

dir *.dwg >dirlst.scr /b this will make a list of your dwgs as a script file

open in Word or Notepad and edit like below my preference is word replace ^p ^pOpen

 

open dwg1 (load "laychanger") close Y
open dwg2 (load "laychanger") close Y
open dwg3 (load "laychanger") close Y

Link to comment
Share on other sites

this is more exact to what I need:

 

I need to point Autocad at a specified folder, and have it systematically open .dwg files and have it preform the following on each:

 

unlock all layers

 

 

Append "-EXST" to every layer name

 

Change every layer Lineweight to .25

 

 

lock all layers

 

 

Zoom Extents

 

Purge

 

Save

 

Exit

Link to comment
Share on other sites

  • 7 years later...

Hello All,

 

I am trying Tuns method on multiple DWG files located in my C:\Users\fcern\Downloads\1SCRIPTS\

folder but I keep getting a message the specified fine can not be found then it opens the correct folder (1SCRIPTS) in AutoCAD and you can see all the drawings. 

 

Can someone tell where I am going wrong? 

 

BAT file and script file code below:

 

FOR %%V IN (C:\Users\fcern\Downloads\1SCRIPTS\*.DWG) DO start "T" /w "C:\Program Files\Autodesk\AutoCAD 2024\acad.exe" %%V /b  "C:\Users\fcern\Downloads\1SCRIPTS\CHANGE PDFSHX VARIABLE2.scr"

 


(setvar "PDFSHX" 0)

SAVE

QUIT
 

 

Thanks!

Link to comment
Share on other sites

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