======================================================================= # ##### # # # # ##### #### # # ##### #### #### # # # # # # # # # # # # # # # # # # # # # # # ##### # # # # # # # ####### # # # # # # ##### # # # # # # # # # # # # # # # # # # # # # # #### # #### ##### # #### #### ###### # ======================================================================= TABLE OF CONTENTS: PURPOSE BENEFITS CONFIGURATION MULTIPLE PLOTTERS PLOT LOGGING ANALYZING PLOT LOGS APPENDIX: A. ACADPLCMD variable options B. Network plot spooling C. Plotting via the Impressario RIP D. System administration issues PURPOSE: This package is designed as an easy-to-use interface to the AutoCAD Plot Spooling feature. Features include background plot spooling, seamless integration with the IRIX Impressario printing system, and plot logging support. BENEFITS: Improved plotting performance through background print spooling. - AutoCAD does not have to wait for the plotter to finish. Improved device management features. - Allows both serial and parallel port plotter connections. - Allows access to other network printing devices. - Provides both manual and automatic control of multiple plotters. Ability to share AutoCAD plotter(s) over the network. - Allows you to "share" your serial and parallel ports. - Requires Impressario Print Server software: (impr_server) Automated plot logging feature collects accounting information. - Works transparently with AutoCAD _PLOT command. CONFIGURATION: 1. Configure AutoCAD to plot to a file name "AutoSpool" 2. Configure AutoCAD to spool to the directory "/var/spool/acad" Default is "/usr/spool/acad" which is equivalent. 3. Set the environment variable "ACADPLCMD" to run this shell script: csh: source /var/spool/acad/bin/ACADPLCMD.csh ksh: . /var/spool/acad/bin/ACADPLCMD.ksh sh: . /var/spool/acad/bin/ACADPLCMD.sh Note: You can instead, insert the last line of the ACADPLCMD.sh file into your acadr13 startup script, usually located at: /opt/acad13/bin/acadr13. 4. Install the "AutoCAD Plot Spooler" printer driver. > printers ->Add... ->AutoCAD Plot Spooler MULTIPLE PLOTTERS: There are two options available in this package for supporting multiple plotter devices. The first uses the concept of the default system printer. To use this method, you simply use the IRIX Print Manager (/usr/sbin/printers) to set the desired printer/plotter as the default printer. Then the AutoSpool output is automatically directed toward that device. This can be done even while AutoCAD is running and requires no further setup. It does require the AutoCAD user have permission to modify printer settings, i.e. he must be a "Privileged User", which can be assigned with the System Manager. The second option can be set up to create an automatic multiple plotter system. To use this option, you will need to follow a specific plotter naming convention. AutoCAD passes the index number of the plotter selected from the configured options to the AutoSpool program. The AutoSpool program then appends this number to a base plotter name (the default is "Plotter"). So, for example, if you select the 3rd plotter for output, AutoSpool will direct output to the device named "Plotter3". If Plotter3 does not exist, output will then go towards the default device. If you wish to change the plotter naming convention, change the variable "PlotterBase" in the AutoSpool shell script file (/var/spool/acad/bin/AutoSpool). The main administrative issue you will run into is maintaining syncronization between the AutoCAD plotter configuration list (which in turn controls the plotter index) and the Print Manager printer names. With AutoCAD, plotters are added sequentially, the first plotter you add is #1, the 2nd #2, etc. In the Print Manager, you specify the printer name at creation time and can't change it once installed. To change a printer name, you must delete and re-install it. The name of the printer is just that, a name, it really doesn't matter what it is called. In a large site, maintaining all these configurations can become difficult. A suggestion that I have found useful, is to set up all your site's plotters on their respective servers. On the local machine, name the plotter according to it number. So your first plotter on server1 would be called "Plotter1" the second plotter on server2 would be called "Plotter2", etc. Then, to connect to Plotter2 (on server1) you select a network connection to server2 (from the Print Manager on server1) and you'll be presented with a list of available printers on server2. Then, simply enter the same name for the remote plotter as it is called on the local server. PLOT LOGGING: Keeping track of who is plotting what in a multi-user CAD environment can become a daunting task. The AutoSpool facility includes several levels of plot logging. There is both a formatted log file (*.log) as well as a tab-delimited data file (*.dat) suitable for automated post-processing in a database or speadsheet program. These are both saved in the log subdirectory located beneath the AutoSpool directory (/var/spool/acad by default). These log files are saved on a per-plotter basis (PlotterN.{log,dat}). Plots done via the default system printer are saved in a files named autospool.{log,dat}. In a large site, an option to simplifying the plot spooling operation is to maintain the plot spooling log directory on an NFS server. In this manner, there will be single log file per plotter. See Appendix B (below) for more information. ANALYZING PLOT LOGS: The plot log data files are suited for automated post-processing. The format (by default) is: ID FIELD DESCRIPTION --- ----- ------------------------------------------------ 1: Proj Directory where the drawing file is located 2: Dwg Name of the drawing file 3: Width Width of the plot 4: Height Height of the plot 5: Units Units of measurement (I or M) 6: Size Size (in bytes) of the plot file 7: User AutoCAD user name (LOGINNAME) 8: Login IRIX login name of the user (whoami) 9: Machine Name of the machine the plot came from (uname) 10: Date Date the plot was done (YY/MM/DD format) 11: Time Time of the plot (24 hr. HH:MM:SS format) Each field is separated from the next via a "tab" character and the field contain no spaces. As the log files are chonological in nature, a simple sort on the desired field will result in useful data. For example the command: sort +0 -1 autospool.dat >autospool.rpt will output data sorted on project directory to the file 'autospool.rpt'. An example shell script (/var/spool/acad/bin/ReadLog) is supplied to serve as a template to aid in extracting useful data from the log file. This would most likely be used to format data for a database or spreadsheet program. Another example (/var/spool/acad/bin/CommaDelimit) can be used to produce comma-delimited data. APPENDIX A: ACADPLCMD variable options This information extracted from the AutoCAD Installation and Performance Guide. Option Function ------ ---------------------------------------------------- %d, %D Specifies the AutoCAD drawing name, including the full path and extension. %e, %E Specifies the equal sign (=). %h, %H Returns the height of the plot area in the selected plotting units. %i, %I Becomes the first letter of the plot units. %l, %L Designates AutoCAD login name. The login name is in the AutoCAD LOGINNAME system variable. %m, %M Returns the AutoCAD plotter model. The model name is the name AutoCAD lists during configuration. %n, %N Becomes the plotter name. AutoCAD uses the plotter name to identify the manufacturer and type of plotter. %p, %P Designates the plotter number. AutoCAD assigns a number to a configured plotter and lists the plotters in this order. %s, %S Specifies the plot spool file name, including the path and extension. %u, %U Specifies the user name entered during installation. %w, %W Returns the width of the plotter area in the selected units. %% Specifies the percent sign (%). APPENDIX B: Network plot spooling (via NFS and automount) In a larger site, you may want to consider the advantages of a centralized plot spooling server. Although you could do this without NFS, the ease of use of NFS and automount far outweight their cost. First you need to ensure that you have the NFS software install and configured properly: > versions nfs I = Installed, R = Removed Name Date Description I nfs mm/dd/yy Network File System, X.Y I nfs.man mm/dd/yy NFS Documentation I nfs.man.nfs mm/dd/yy NFS Support Manual Pages I nfs.man.relnotes mm/dd/yy NFS Release Notes I nfs.sw mm/dd/yy NFS Software I nfs.sw.nfs mm/dd/yy NFS Support I nfs.sw.nis mm/dd/yy NIS (formerly Yellow Pages) Support > su # chkconfig nfs on # chkconfig automount on Then, you'll need to export the server's plot spooling directory. To do so, edit the file /etc/exports (as root) to include: /var/spool/acad/log Note that the exported directory allows access to all points below that directory. You can export higher directories, for example /var/spool if you also use, for example, the PC-NFS or Samba print spooling services. Then run the command (as root): exportfs -a ; Exports all filesystems in /etc/exports Now you are ready to test automount access from another host. Consult the man-page for more information on automount, but in a nutshell, automount "automatically mounts" NFS filesystems for you when required. You trigger automount by accessing the "mount point" which is a special directory named /hosts, by default. Thus, issuing the command: ls -l /hosts/SERVER/var/spool/acad/log will trigger the mounting of the NFS filesystem /var/spool/acad/log on the server named SERVER. The mounted filesystem will stay attached for approximately 5 minutes after the last access at which point it will automatically be disconnected. An excellent way to use automount is to combine it with symbolic links. For example, given the following command sequence: > su ; Become super user # umask 0 ; Make files writeable by all # cd /var/spool/acad ; The AutoCAD spool directory # ln -s /hosts/SERVER/var/spool/acad/log . will link the local /var/spool/acad/log directory to the NFS filesystem on SERVER. If you have many client machines accessing the plot spooling facilities, you can now automatically consolidate the plot log files in one central location. Note, with the network plotting capabilities afforded in AutoSpool, you are not restricted to physically attaching plotters to the network plot spooling server. They may instead be attached to various machines as needed. Below is a schematic diagram of a typical networked plot spooling setup: {Plotter1} {Plotter2} Plotter3 ^ | +========+ | Server | +========+ /var /spool /acad /bin +=========+ /log +=========+ {Plotter1} Plotter1 <- | Client1 | ^ ^ | Client2 | -> Plotter2 {Plotter2} +=========+ : : +=========+ {Plotter3} {Plotter3} /var : : /var /spool : : /spool /acad : : /acad /bin : : /bin /log.......: :............./log Legend: ... = Symbolic Link (to /hosts/SERVER/var/spool/acad/log) <- = A locally attached printer/plotter {} = A remotely attached network printer/plotter As you can see, each machine has a local AutoSpool directory and there is a shared plot log directory on the server. A plotter is connected to each machine. Via the Impressario Print Manager, the non-local plotters are installed on each machine allowing access to any plotter from any machine. A more advanced setup could separate the AutoSpool executable programs (in /var/spool/acad/bin) from the actual spooling directory. The executable directory and files must reside on each machine, however by splitting the spool (and thus the log) directory off to the server, all plot files will reside on the server. This may simplify system administration tasks associated with archiving and deleting plot files. In this case, the log directory is created directly below the spool directory. A consideration to make is that this option increases network traffic over the first approach (above). In a worst case scenario, imagine Client1 plotting to Plotter1. The plot file is created by Client1, copied to Server, then read from Server (by Client1 'lp' process). If the same situation happened with local spooling, the only network traffic would involve the writing of the plot log data. Note that use of the IRIX 'cachefs' option can improve performance in this case. APPENDIX C: Plotting via the Impressario RIP You are not restricted to using the AutoCAD Plot Spooler driver. If you have a hardcopy device supported by Impressario, you can take advantage of the host CPU raster image processing (RIP) engine in Impressario. Not only will you gain additional printing performance, you also get the benefits of enhanced device management afforded by Impressario. To use Impressario with AutoCAD, you only need to understand how Impressario works. In its basic mode, it accepts PostScript data and then converts (rasterizes) it to the native printer language, for example PCL in the case of most laser printers. So, in order to use it with AutoCAD, just configure a PostScript plotter device, have it print to a file (named AutoSpool) and you are ready to print. Impressario is designed to drive your hardcopy device at its rated speed. For more information about Impressario, check out the IRIS Impressario web page at: http://www.sgi.com/Technology/Impressario/ APPENDIX D: System administration issues There is one main system administration issue with plot spooling. That is, what to do with the spooled plot files. One approach is to let the 'AutoSpool' utility autiomatically delete the file after it is plotted. This is enabled by default and is controlled by the internal variable 'AutoDelete=0/1'. If 'AutoDelete=0' the spool file is left after it is plotted. By not deleting the spool file, it is possible to re-plot previous plots by consulting the plot spool log file and then re-issue the system print command on the desired plot spool file. However, one problem you will run into sooner or later is that the plot spool directory will become filled with many large files. You can manually remove the files via: > su # rm -f /var/spool/acad/*.* Or, you can automate this process with a 'crom' job. Cron jobs are automatically run at intervals specified in a 'crontab'. An example autospool cleaning crontab entry is contained in the file: /var/spool/acad/bin/autospool.crontab To install this cron job, use the following commands: > su # cd /usr/spool/cron/crontabs # cat /var/spool/acad/bin/autospool.crontab >> root The default setting will now delete plot spool files in /var/spool/acad weekly, Sunday morning at 2:00 AM. You can change the time and frequency. Consult the crontab man-page (man crontab) for more information.