About Using AutoSpool

About Using AutoSpool

With AutoSpool you can plot to an automatically generated file name in the folder
you designate.

Once the file has been created, the spooler application specified in the Options
dialog box is executed.

Although it is not necessary to use AutoSpool to print to network printers and plotters,
AutoSpool is available for users of other networks and for users who want to start
another application at plot time using the AutoSpool mechanism.

When you add printers or plotters in the Add-a-Plotter wizard, select a network port,
which meets most printer and plotter network connectivity requirements.

With AutoSpool, you can send a plot file to an assigned device for printing while
you continue working. AutoSpool accommodates special plotting and printing requirements
such as log files or nonstandard networks. You can also use most plotting routines
developed for previous releases of the program.

When you run AutoSpool, the program writes the plot job to a random file name in
a folder you specify. Next, the program runs a print queue submission program along
with a user-specified parameter list. At a minimum, the parameter list must include
the random file name the program assigned to the plot job. The parameter list is represented
by the %s variable. Other parameters can be used, for example, to improve resolution
at the destination device or generate log files.

To set up AutoSpool, you must provide the executable file the program invokes and
specify that executable name and parameter list in the Options dialog box. The executable
file is usually a batch program that you create, but it can also be a third-party
program. If you use a third-party program, the setup is essentially the same. To determine
the parameter variables required for the third-party program, refer to the documentation
for that program.

You can use several methods for configuring plot spooling:

  • A system printer driver and the print manager to enable spooling
  • An HDI driver and a system printer driver configured for the same I/O port to force
    the HDI driver’s output to the system spooler
  • AutoSpool

If you configure the program for plot spooling using AutoSpool, you must configure
your printer, specify the AutoSpool executable file, and specify the print file location.

Create a Batch File for AutoSpool

The following sample plot.bat file shows some of the functions that can be included in a batch file. This batch
file determines the destination hard copy device, submits the print job through the
operating system Copy command, and then deletes the temporary plot file created by
the program.

This batch file requires two parameters to be passed from the program, %s and %c,
which are referenced internally in the batch program as %1 and %2, respectively. The
imaginary devices in this example are attached to the local workstation and two different
network printer servers. See the following table for an explanation of the device
names and connections. Note that the order in which parameters are passed to the AutoSpool
executable file determines how the variable is referenced in the program or batch
file. For example, the first variable becomes %1 and so forth.

Device names and connections



Network share name

Program configuration name

Local laser printer




Network-attached plotter




Network-attached laser printer




@echo off
Rem determine the destination
if %2 == my_laser goto PlotA
if %2 == hp755cm goto PlotB
if %2 == net_laser goto PlotC
Rem trap for undefined devices
echo *******************Warning**********************
echo %2 is not defined to the Plot Script, PLOT.BAT
echo The plot job has been canceled.
echo ************************************************
goto END
Rem send the job
copy %1 /b LPT1
goto END
copy %1 /b milanahp755cm
goto END
copy %1 /b kilolaser
goto END
Rem clean up and exit
erase %1
NOTE:Device names are case-sensitive. Make sure that the name configured for the device
in the program exactly matches the name in your batch program.

Learning AutoCad