KCS Batch Processing
1.0 (released 7/22/14)
provides batch processing without the problems often encountered with
other script-based batch utilities. The main problem with others is that
any open drawing will halt the process. KCS Batch Processing overcomes
this problem in the following ways:
1. If the
drawing is to be plotted only (not saved), KCS will open it read-only
and do the plot. If the plot should fail, it will write
an entry to a failure log
2. If other
actions are to be done and Saved, KCS will open it read-only so it can write
an entry to a failure log, then close it without saving.
If a failure log
is created, it will be displayed when the batch is done, indicating each problem
drawing and the error, along with who had it open. The Retry button will
then allow you to process this list again. (See below for further details.)
There are a
number of ways to add drawings to the list:
Folders: This method allows you to choose a complete folder to add
at once, with an option to include all sub-folders.
Files: This method allows you to choose any number of individual
drawing files (multiple files can be selected at once.)
and Restore: You can Save the current drawing list and Restore
that list at any time.
You can Remove selected files from the list at any time.
If the previous batch run encountered any open drawings that could not
be saved, or drawings that could not be plotted as specified, the
Retry button will access that log and present a list of those drawings.
used plot options are provided, each using whatever plot configuration is
current in the drawing. Note that even opened drawings will be opened
(read-only) and plotted. If more detailed plot options are desired, they may be
created in the Custom Commands option (see below).
needed batch actions are provided. You can also employ the Custom
Commands option to do just about anything you wish to accomplish (see
file is provided, in the same folder as the VLX file. This file
defines a KCS_BATCH_CUSTOM function that will be run when Your Custom
Commands is selected. This function can be edited to do whatever you
want it to do. The recommended practice is to define a function of
your own (or any number of them) in this file, test each of your
functions, and then include whichever function(s) you wish to run as
part of the main KCS_BATCH_CUSTOM function. This file includes
comments, instructions, and a few sample functions to get
you started. If your own LISP
skills aren't quite up to the task, you can contact KCS
(or any other LISP expert you may know) to help you out.
This utility provides a function
(kcs_batch_plotfinish) to be used with any custom plot routine. Once you have your
"-plot" command worked out, leave off the final Enter ("") or
two, and follow it with the (kcs_batch_plotfinish) function.
This function will feed the Enters to the plot command (up to five of them) until the command is finished.
This will ensure that any deviation from the expected number of Enters will be
handled. In addition, if something unexpected should make the plot command
cause an endless loop, this function will recognize that and cancel the plot
command so the batch process can continue. And it will then write an entry
into the kcs_batchfail_log, to be displayed when the batch is complete.
See the batch_pdf_layouts function in the
to PDF Files
If you are
batch plotting to 100 PDF files, you probably don't want to come back
to find 100 PDF files open on your system! KCS cannot control this,
but here's how you can (assuming the use of "DWG to
in any drawing, and select "DWG to PDF.pc3", then click
Properties. Click Custom Properties, and turn off the setting shown
NOTE: You may need to review
other settings and re-test after making the above change.
At this time,
if Save is specified. each selected file will be checked to see if it
might be open. Any open files will be displayed in a list, along with
who has each file open and on what system.
Preliminary Warning, along with the warning message shown, allows you
to notify others to close those drawings before proceeding. For files
on your own system, you will most likely need to exit KCS Batch to do
so. Select the "Save List and Exit" button, then use the
"Restore Saved Drawing List" button to retrieve that list.
In addition to
the Preliminary Warning, the status of each drawing will also be
checked as it is opened. Any that are already open at that time cannot
be saved and will be posted to a failure log (unless being plotted
only), and this log will be displayed
when the batch is finished. The files listed in this log can then be
processed again, after getting them closed, by selecting the
"Retry Failed Drawings" button.
Once the batch
starts, a progress bar will indicate the percentage done, until
For any problems, critiques, or kudos, please
contact email@example.com. We'd like to
hear from you.
Initial release 7/22/14