Network plotting with CATIA/CADAM Drafting (CCD) on Windows NT

4 December 1997

This is a supplement to the CATIA/CADAM Drafting Installation Guide for Windows NT. This paper provides instructions to setup a printer spooler on Windows NT to facilitate plotting to a network plotter from CCD. Refer to the Windows NT documentation for additional information on creating a printer.

These instructions will help you setup print spooling on Windows NT 4.0 for a network plotter that is controlled by a print server, either internal or external to the plotter. These print servers can be accessed by hostname or IP address, and contain their own LPR queues. It is assumed throughout this paper that the TCP/IP protocol has been installed and is functioning properly.

Even though plot files can be sent to a plotter using the LPR command, it should only be used for testing purposes. Windows NT does not provide a good queuing mechanism for LPR, so subsequent plot jobs can be lost. Hence, this paper will show you how to setup a printer spooler on each Windows NT client.

Installing the printer on the local workstation gives the user better monitoring capabilities of his/her plot jobs.

CCD does not use the Windows NT print drivers or plotter manufacturers’ drivers. The print spooling is only used to manage plot job queues. The following instructions will show you what is required to accomplish this.

Sample batch (.bat) files are also shown at the end of this paper.

 

Note: All the screens shown are from Windows NT 4.0

 

  

 

 

  1. Logon as the Administrator or a user with administrator privileges.
  2. Click on Start, then Settings and select Printers. You can also select Printers from the Control Panel. The Printers panel will be displayed.
  3. Double-click on Add Printer to start the Add Printer Wizard. Select My Computer. Click on Next>.
  4.  

  5. Select Add Port from the next Add Printer Wizard panel. Select LPR Port from the Printer Ports panel and click on New Port.
  6. Enter the hostname or address of the plotter print server for the first field and "raw" for the second field. When you click on OK, the system will try to access the print server. If it cannot, an error will be displayed, but the port will still be added even if it is an invalid name. Be careful what you type! Close the Printer Ports panel by clicking on Close.
  7.  

     

  8. If your system can communicate with the plotter’s print server, the new port will be added, as the example above shows.
  9. Make sure that the port you have just added and "Enable printer pooling" are checked. Click on Next>.
  10.  

     

     

  11. The manufacturer’s printers list will be displayed. This is when the print driver is installed. Remember, whichever printer you select will not be used by CCD, but if your plotter is listed, select it to allow other applications to use it. The HP plotter selected in the example above is supplied on the NT 4.0 installation CD. Click on Next>.
  12. The next panel will allow you to change the name of the printer. If your plotter was not listed, now is the time to change the printer name to match your plotter’s vendor and model. Leave default printer set to no. Click on Next>.
  13.  

     

  14. If your printer driver has already been installed, you will have the option to keep it or replace it, as the example above indicates. Select the appropriate option. Click on Next> to continue.
  15.  

     

     

  16. It is important that you select Shared and provide a Shared Name. This is the mechanism CCD will use to send the plot output files to the plotter. Do not select any of the other operating systems, unless you want them to share your printer/plotter. Click on Next> to continue.
  17.  

  18. Next, you will be asked if you would like to print a test page. If you selected a print driver that matches your plotter, then you should select the "Yes" button. Otherwise, select the "No" button from the Add Printer Wizard panel. The test page will be printed when you complete the installation of your printer if you selected "Yes". Click on Next> to continue.
  19.  

    Note: printing a test page does not test accessing the printer via the Share Name.

     

     

     

     

  20. If you are installing the printer driver for the first time, the Files Needed panel will be displayed. This is where you provide the media where the driver can be found. If you selected a driver from the list in step 8, then change the drive letter to where the Windows NT Workstation CD-ROM can be found. Leave the directory name as \i386. Click on OK.

This completes the printer installation. The Printers panel will now show the new printer.

For further printer configuration options, such as scheduling, security, device settings, etc., select the new printer from the Printers panel using the right mouse button, then select Properties. Please refer to the Windows NT documentation for further details.

Provided that you have modified the .bat file that you are going to use (see the sample batch file scripts starting on page 10), you should now be able to submit plots from CCD to the newly created printer. For instructions on how to plot a model from CCD, refer to the CATIA/CADAM Drafting Installation Guide for Windows NT.

 

 

If the print spooling is done at the local NT workstation, the CCD user can monitor the status of his/her plot jobs by displaying the Printer Status in the background. To do this, double-click on the printer. When the plot job completes, a notification will be displayed as shown above.

Note: If print spooling is done at another Windows NT workstation or server, the

user will not see the "print notification" screen.

  

 

Sample batch file 1

 

ECHO OFF


rem This bat file may be used to send the plot


rem output file to a plotter.


rem


rem The following parameters are passed in here:


rem %1 copies


rem %2 plot output file name


rem %3 number of plots contained in file


rem %4 newplot file name


rem %5 status file name


rem *********************************************************


rem CUSTOMIZE HERE TO SEND OUTPUT TO DESIRED DESTINATION!!!


copy %2 \\pc0117\hp_650


rem Delete plot output file after all copies have been plotted


IF "%1" == "1" DEL %2

 


 


 


The sample .bat file above (provided with CCD under the PLOT directory) shows all that is required to send the plot output file to the printer share name hp_650 defined on the NT workstation called pc0117.

  

 

Sample batch file 2

 

ECHO OFF


rem This bat file may be used to send the plot


rem output file to a plotter.


rem


rem The following parameters are passed in here:


rem %1 copies


rem %2 plot output file name


rem %3 number of plots contained in file


rem %4 newplot file name


rem %5 status file name


rem *********************************************************


rem CUSTOMIZE HERE TO SEND OUTPUT TO DESIRED DESTINATION!!!


rem The header.txt and trailer.txt are not CCD provided or supported files.


 


type C:\CCD_419\PLOT\header.txt > %2.tmp


type %2 >> %2.tmp


type C:\CCD_419\PLOT\trailer.txt >> %2.tmp


 


copy %2.tmp \\pc0117\hp_650


 


rem Delete plot output file after all copies have been plotted


IF "%1" == "1" DEL %2.tmp

 

 

In some cases, you may want to modify the header/trailer information for a particular plotter and insert printer control language to indicate the format of the language that follows, for example.

Some printer/plotter manufacturers, such as CalComp and Hewlett Packard, may give you these options. To accomplish this, all you need to do is provide plotter specific commands or control codes at the beginning and/or at the end of the file that is sent to the plotter.

The sample .bat file above shows how to add header and trailer information to the plot output file before it is sent to the plotter. In this example, two files containing header and trailer control codes for the plotter are inserted in the plot output file before it is sent to the plotter. The first is called header.txt and is copied to a file called %2.tmp. The plot output file (%2) is appended to the %2.tmp file and finally, the trailer.txt file is appended to the %2.tmp file. The %2.tmp is then sent to the plotter using the copy command.

 

 

 

 

 

 

Sample batch file 3

 

ECHO OFF

rem This bat file may be used to send the plot


rem output file to a plotter.


rem


rem The following parameters are passed in here:


rem %1 copies


rem %2 plot output file name


rem %3 number of plots contained in file


rem %4 newplot file name


rem %5 status file name


rem *********************************************************


rem CUSTOMIZE HERE TO SEND OUTPUT TO DESIRED DESTINATION!!!


rem This method is recommended for test purposes only


 


lpr -S dj650 -P raw %2


 


rem Delete plot output file after all copies have been plotted


rem IF "%1" == "1" DEL %2

 

 

 

For test purposes only, you can use the above sample .bat file to verify that you can access a network plotter from your NT workstation. In the example above, the plotter’s print server’s hostname is dj650 and "raw" means to use its default print queue.

While testing, comment the last line of the .bat file. This is useful because when you submit a plot job from CCD the plot output file will not be deleted. Once you have a plot file you can run this .bat file (or the lpr command) from a DOS shell without having to submit a plot from CCD.