<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
  <channel>
<title>File batch and scripts</title>
<link>http://www.zwsoft.com/forum/viewthread.php?tid=1999</link>
<description>[i=s] Post Last Edit by zenobio at 2012-2-17 17:21 [/i]

Hi when i used Autocad12 in dos I found this file batch &quot;MKSLIDE.BAT&quot;
@Echo Off
  Echo .ÿ
  Echo *===[ MkSlide.Bat copyright 1992 Mountain Software ]===*
  Echo .ÿ
  Echo MkSlide.Bat will create a slide file for each AutoCAD drawing in a list
  Echo of Directories. Use this batch file to create the initial set of AutoCAD
  Echo slide files for all of your drawings.
  Echo .
  Echo Example:
  Echo .ÿ
  Echo MKSLIDE DWGS BLOCKS
  Echo .ÿ
  Echo will create slide files for all drawings in the directories DWGS and BLOCKS
  Echo in addition to those in the current directory. MkSlide has only been tested
  Echo with Release 11 and DOS 3.3/5.0 but will probably work with other versions.
  Echo of DOS and AutoCAD. If AutoCAD needs any drivers or any Environment variables
  Echo SET, then you must do that before running MkSlide. Make sure that all menu 
  Echo files, text styles, blocks, or any other external files are available, 
  Echo otherwise the script will fail.
  Echo .ÿ
  Echo Press Ctrl-C to cancel or
  Echo .ÿ
  Pause
  Echo Creating MSlide.Scr...
:Loop
  Set _DIR=%1
  If [%_DIR%]==[] SET _DIR=.
  If Exist MkSlide.Scr Del MkSlide.Scr
  For %%f In (%_DIR%\*.dwg) Do Echo 2 %%f .ZOOM E .ZOOM 0.9X .MSLIDE  .QUIT Y&gt;&gt;MkSlide.Scr
  Echo 0&gt;&gt;MkSlide.Scr
  If Not Exist %_DIR%\*.dwg GoTo NoDwgs
  Echo Loading AutoCAD...
  ACAD Dummy MkSlide
:NoDwgs
  If [%_Dir%]==[.] Goto Done
  Shift
  GoTo Loop
:Done
  Echo Done
  Set _DIR=


the file make a file script (*.scr) like this:

2 .\01NORTH.dwg .ZOOM E .ZOOM 0.9X .MSLIDE  .QUIT Y
2 .\02NORTH.dwg .ZOOM E .ZOOM 0.9X .MSLIDE  .QUIT Y
2 .\03NORTH.dwg .ZOOM E .ZOOM 0.9X .MSLIDE  .QUIT Y
...............


now I changed this line

 For %%f In (%_DIR%\*.dwg) Do Echo 2 %%f .ZOOM E .ZOOM 0.9X .MSLIDE  .QUIT Y&gt;&gt;MkSlide.Scr

in this

  For %%f In (%_DIR%\*.dwg) Do Echo OPEN &quot;%_DIR%/%%f&quot; _ZOOM E _ZOOM 0.9X _MSLIDE  _QUIT Y&gt;&gt;MkSlide.Scr

that give me this script

OPEN &quot;./.\01NORTH.dwg&quot; _ZOOM E _ZOOM 0.9X _MSLIDE  _QUIT Y
OPEN &quot;./.\02NORTH.dwg&quot; _ZOOM E _ZOOM 0.9X _MSLIDE  _QUIT Y
OPEN &quot;./.\03NORTH.dwg&quot; _ZOOM E _ZOOM 0.9X _MSLIDE  _QUIT Y
...............


with e text editor I adapt the line in this

OPEN &quot;C:/my_folder/01NORTH.dwg&quot; _ZOOM E _ZOOM 0.9X _MSLIDE  _QUIT Y
OPEN &quot;C:/my_folder/02NORTH.dwg&quot; _ZOOM E _ZOOM 0.9X _MSLIDE  _QUIT Y
OPEN &quot;C:/my_folder/03NORTH.dwg&quot; _ZOOM E _ZOOM 0.9X _MSLIDE  _QUIT Y
...............


Zwcad open the files but does nothing elsethat is wrote in comand line:

Comando: OPEN
Nome del Disegno : &quot;C:/my_folder/01NORTH.dwg&quot; _ZOOM E _ZOOM 0.9X _MSLIDE  _QUIT Y
...............

and so on

I tried also without quote in the name of dwg (C:/my_folder/01NORTH.dwg) and with c: before comands (C:_zomm)
but the result is the same.

where I'm wrong ?

thanks for the answers this file batch was very helpful for create slide for my library</description>
<author>zenobio</author>
<pubDate>2012-02-17 17:18:12</pubDate>
<item><link>http://www.zwsoft.com/forum/viewthread.php?tid=1999&amp;pid=14449</link>
<description>I'm not a programing guy.
who can help?</description>
<author>DDWZW</author>
<pubDate>2012-03-05 14:48:26</pubDate>
</item><item><link>http://www.zwsoft.com/forum/viewthread.php?tid=1999&amp;pid=14358</link>
<description>[i=s] Post Last Edit by zenobio at 2012-2-24 22:15 [/i]

I already use scripts for setting some variables in my draws, this for exaple :
_osmode 235
_SCROLLBAR ON
_UCSICON _c
-style arial arial     
_-LAYER N QUOTE;;
_-LAYER N MURI C 3 MURI;;
_-insert d:/l/lib2/freccia/frecci5;0,0;;;;
_ERASE L;;
-DIMSTYLE SA Zenobio
PDMODE 3
DIMADEC 0
…..........
DIMZIN 0
with which I imposed the dimension variables, object snaps, layers etc. 
and it works well
but with this script I do not understand where is the problem

If it were easy I would not ask for help</description>
<author>zenobio</author>
<pubDate>2012-02-24 22:13:27</pubDate>
</item><item><link>http://www.zwsoft.com/forum/viewthread.php?tid=1999&amp;pid=14348</link>
<description>it's a little bit complicated...</description>
<author>DDWZW</author>
<pubDate>2012-02-20 10:06:26</pubDate>
</item>  </channel>
</rss>