TheSwamp
CAD Forums => CAD General => Topic started by: idrawwithcad on November 08, 2005, 04:47:08 PM
-
Hello all,
A job that I am currently working on involves producing an e-transmit file for each drawing in the set whenever we issue them. There are LOTS of drawings and its very time consuming, so i was just wondering if anyone has a way of batch producing individual ZIP files??
Any help most appreciated!!
Thanks
-
Get your current etransmit settings the way you want them then run a script what goes a little like this:
OPEN
<drawing1>
-ETRANSMIT
C
A
CLOSE
OPEN
<drawing2>
-ETRANSMIT
C
A
CLOSE
<lather>
<rinse>
<repeat as needed>
This was all out of my head and not tested but should work with minor tweaking.
-
thanks Bob, i will give that a shot
-
ok, with a slight tweak that works fine...thanks very much Bob
this lead me to think of another possible way to make what we have to do easier!
when we create these individual etransmit files, we also have to add a prefix to the front of the file name that says: CAD-
anyone know a way that this can be done automatically?
thanks once again!
-
the zip file or the drawing file?
-
I guess zip file makes more sense as the .dwg kinda gives away the fact that the drawing is cad. Again some tweaking is probably necessary but add this to your script
<your tweaked out script>
VBASTMT
thisdrawing.SendCommand "sh rename " & ThisDrawing.GetVariable("dwgprefix") & Left(ThisDrawing.Name, Len(ThisDrawing.Name) - 4) & ".bak CAD-" & Left(ThisDrawing.Name, Len(ThisDrawing.Name) - 4) & ".bak" & vbCr
<next drawing>
-
You can try this..
http://www.autodwg.com/eTransmit/
or this..
http://www.caddepot.com/cgi-bin/cfiles/cfiles.cgi?0,0,0,0,21,2165
this last one was made by me..
is a simple Batch LISP Processor...
-
thanks folks, someone here will have a play with that info today and see what happens :kewl:
-
let me break down what that's doing. It will make it easier to modify to fit your needs.
VBASTMT tells acad that you want to enter a vba command at the command line
thisdrawing.SendCommand basically the same as (command in lisp)
"sh rename " & The first part of the command string, the & tells it to add the next part to the string
ThisDrawing.GetVariable("dwgprefix") & Gets the path of the drawing, substitute the path to your zip
Left(ThisDrawing.Name, Len(ThisDrawing.Name) - 4) & gets the drawing name and strips the .dwg off
".bak CAD-" & Adds a different extention to the filename and CAD- to the new filename I meant to change this to .zip but was testing with .bak
Left(ThisDrawing.Name, Len(ThisDrawing.Name) - 4) & Again, drawing name without .dwg
".bak" & again, meant to use .zip
vbCr Enter so the command will execute
The net effect of all of that is somthing like
VBASTMT
Enter Expression: sh
OS Command: rename c:\drawings\here\drawing.zip CAD-drawing.zip
Command: