Macro Language Reference > Macros > System > device
  
device
Description
Enables configuration of printer devices, used within the startwin.3ad system file.
 
Example 228. Default device names
The example below shows APP's default device names from startdos.3ad. You can use device to rename any of your ports.
device "$$NAME$$",0,Direct,File,Network,Com1,Com2,lpt1,
lpt2,lpt3,EPT
Syntax
device $$name$$:s start:n port:w name:t? default:n? switch:i?
$$name$$
The name of the device you are configuring: usually be a name from the startwin.3ad file, e.g. PScript.
start
The number of the port whose name is to be defined first: there may be up to 16 output ports (numbered 0..15).
port
The relevant port names: the first three (0..2) are particular to PTC ALD . The first is a direct mode (used mainly for screens), the second is a file mode (used mainly for printers) and the third is reserved for future expansion.
name
The name of the device you are configuring: usually be a name from the startwin.3ad file, e.g. PScript.
default
The default port number for this device.
switch
Single characters that indicate the ports that the device may access. If the device can access the port, an X is used, otherwise a . is used. For file types, PTC ALD uses a file type extension e.g. .ps for PostScript, instead of an X.
Additional Information
The first format with the constant first parameter "$$NAME$$" defines to PTC ALD the names of the printer output ports. MS-DOS is slow when sending data to the parallel (LPT) ports. For this reason, PTC ALD intercepts all data directed at a parallel port and sends it directly to the BIOS instead. You can prevent PTC ALD from intercepting data as it is sent to the port by changing the names of the parallel ports to lower case (e.g. lpt#). If you are running PTC ALD on a network you must instruct it to use network printers rather than local printers by editing the startwin.3ad and changing the 'print device name' entries from upper case LPT# to lower case lpt#. If you do not do this, files sent to the printer will not be closed and will not print.
The second format of the device macro specifies which devices may access which ports. The example below configures a PostScript printer to default to using the lpt2: port and no other. This is port number 6 in PTC ALDstartdos.3ad system file:
device "Pscript",6,.,.ps,.,.,.,.,X,.,.