Justification and Substitution Codes in the Page Setup Dialog Box

AutoCAD AutoLISP & Visual LISP

 
Justification and Substitution Codes in the Page Setup Dialog Box
 
 
 

When you specify a header and footer in the Page Setup dialog box, only the ampersand character (&) is considered as an escape character. Both the ampersand and the character that follows are not copied to the output line. Instead, they either justify the following text, or VLISP replaces them with variable information.

In the Page Setup dialog box, justification codes indicate how header text is justified on the printed page. You can specify any of the following:

&l

Left-justified (the default).

&c

Centered within the page margins.

&r

Right-justified.

In the Page Setup dialog box, replace codes are variables for which VLISP substitutes values. Specify any of the following:

&f

VLISP replaces this code with the title of the active VLISP window. When invoked from a VLISP text editor window, &f is the name of the file being edited, including directory and extension.

&d

Current system date. To select a date format, choose Edit Extra Commands Format Date/Time from the VLISP menu.

&t

Current system time. To select a time format, choose Edit Extra Commands Format Date/Time from the VLISP menu.

&p

Current page number.

To include an ampersand character in your heading text, enter two in succession.

The default heading is set to the following:

&cFile: &f &r&dt 

The default footing is set as follows:

&r&p

The following is a sample printed page from an AutoLISP source file using the default page layout settings:

            File: REACTORSTUFF.LSP            12/11/98
    
(defun saveDrawingInfo (calling-reactor commandInfo / dwgname filesize)
  (setq dwgname (cadr commandInfo)
     filesize (vl-file-size dwgname)
  )
  (alert (strcat "The file size of “ dwgname “ is “))
.
.
.
 (princ)
)
                                             2