Use AutoSpool (Concept)

AutoCAD

 
Use AutoSpool
Concept Procedure Quick Reference
 
 
 

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

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 Windows 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 versions of AutoCAD.

When you run AutoSpool, AutoCAD writes the plot job to a random file name in a folder you specify. Next, AutoCAD 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 AutoCAD 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 AutoCAD 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 Windows system printer driver and the Print Manager to enable spooling
  • An HDI driver and a Windows 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 AutoCAD 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 AutoCAD.

This batch file requires two parameters to be passed from AutoCAD, %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

Description

Server

Network share name

AutoCAD configuration name

Local laser printer

 

 

my_laser

Network-attached plotter

milana

\\milana\hp755cm

hp755cm

Network-attached laser printer

kilo

\\kilo\laser

net_laser

Rem PLOT.BAT
@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 ************************************************
pause
goto END
      
Rem send the job
:PlotA
copy %1 /b LPT1
goto END
:PlotB
copy %1 /b \\milana\hp755cm
goto END
:PlotC
copy %1 /b \\kilo\laser
goto END
      
Rem clean up and exit
:END
erase %1
exit
NoteDevice names are case-sensitive. Make sure that the name configured for the device in AutoCAD exactly matches the name in your batch program.