Creating Your Own Linetypes
AutoCAD and AutoCAD LT come with a large number of linetypes and hatch patterns. However, when these do not serve your particular needs, you can create your own linetypes and hatch patterns. You can then use them in your drawings in the same way that you use the linetypes and hatch patterns that come with the software. Linetypes are useful whenever you don’t want a continuous linetype. They apply not only to lines, but also to polylines, arcs, ellipses, wireframes, and solids—in fact, to most objects. You use hatch patterns to fill in closed (or almost closed) areas. Hatch patterns often represent textures or materials.
Creating Linetypes
There are two types of linetypes: simple and complex. Simple linetypes consist of only dashes and dots. Complex linetypes usually have dashes and/or dots, but also contain text and/or shapes. The default linetype file is acad.lin for AutoCAD and acadlt.lin for AutoCAD LT. You can add your own linetype definitions to this file or create your own linetype files. Linetype files are text files and must have a .lin file extension. Of course, be sure to make a backup copy of acad.lin or acadlt.lin before you edit it. You commonly use Notepad to edit a linetype file.
Creating simple linetypes
In the syntax for creating simple linetypes, each linetype is defined using two lines of text. The first line contains the linetype name and an optional description, formatted as follows:
*linetypename[, description]
Here are some points to remember:
✦ Always start the definition with an asterisk.
✦The description is limited to 47 characters.
✦If you include a description, precede it with a comma.
The second line of the linetype syntax is its definition. With simple linetypes, you’re limited to dashes, dots, and spaces, which are measured in units and specified as follows:
✦ A dash is indicated by a positive number.
✦A dot is indicated by a 0.
✦A space is indicated by a negative number.
✦Each item is separated by a comma, there are no spaces, and the maximum line length is 80 characters.
✦Each line must start with the letter A.
The following definition creates a line with two dashes of 0.25 units, followed by two dots, all separated by spaces of 0.5 units.
*DASHDOT,Dash dot __ . __ . __ . __ . __ . __ . __ . __
A,.5,-.25,0,-.25
This indicates a repeating pattern starting with a dash 0.5 drawing units long, a space 0.25 drawing units long, a dot, and another space 0.25 drawing units long. This pattern continues for the length of the line, ending with a dash 0.5 drawing units long. The linetype would be displayed as shown below.
__ . __ . __ . __ . __ . __ . __ . __
If you feel quite confident, you can even create linetypes on the fly, using the command-line
form of the LINETYPE command. Type -linetype↵ and use the Create option. Follow the
prompts and type the linetype definition on the command line. If you make a mistake, you
must open the linetype file in a text editor to make your corrections.