home - about - advertise     

AutoCAD Tutorial

AutoCAD 2004 Customization Tutorial: Adding Text to Status Bar

June 26, 2003

The MODEMACRO system variable enables you to add text to the status bar. This system variable is not saved so the text that you enter will be available for the current session only. Here you will learn how to add a permanent text to the status bar.


1. Start AutoCAD.

2. In Command line type MODEMACRO and then press enter. The following prompt will appear:

Enter new value for MODEMACRO, or . for none <"">:

3. Type "Hello World!" (With or without quotes) and then press Enter. The text will appear to the left of the status bar [Figure 1].

Figure 1

4. Enter MODEMACRO again. Type a period (.) and then press Enter. The text will disappear:

Command: modemacro 8

Enter new value for MODEMACRO, or . for none <""Hello World!"">: . 8

5. Add a sample text to the status bar.

6. Exit AutoCAD.

7. Restart AutoCAD. The text is gone. To make the text permanent you should use a simple AutoLISP routine. This routine should be added to the "acad2004.lsp" or "acad2004doc.lsp".

8. In command line type Notepad and press Enter twice. The Notepad window appears.

9. Open "acad2004.lsp". The file is located in Support folder. For example if AutoCAD is installed on drive C: the path might be "C:\Program Files\AutoCAD 2004\Support\".

10. Add the proper text to the file [Figure 2].

Figure 2 - Click image to enlarge


  • The "defun-q" function defines the S::STARTUP function. We use "defun-q" instead of "defun" to be able to append different definitions of S::STARTUP together.
  • The "setvar" function is used to assign the text in quotes to the MODEMACRO system variable.
  • The (princ) statement is used for a clean exit.

11. Save the file.

12. Restart AutoCAD. The text will appear on status bar [Figure 3].

Figure 3

About the Author

Alireza Parsai is the founder of cadpanel.com. He is a mechanical engineer with more than 12 years experience with AutoCAD. Alireza is an Autodesk Authorized Author, the AutoCAD consultant for Al Khawarizmi Institute, a contributing editor for Augiworld magazine, a writer for CAD Digest, an instructor for AUGI Training Program, and an elected speaker for Autodesk University 2002. He has written 7 books in Farsi, 3 booklets in English, and more than 30 articles for different magazines and newsletters. You can reach him at alireza.parsai@cadpanel.com or visit his website www.cadpanel.com

More CAD Corner tutorials >>



Get all the week's articles
(current issue)