Select Page

As your drawing needs expand you may find that the standard line types are not adequate for your application. Fortunately you can create your own. This section explains how to go about creating your own custom line types.

chapter 19 shows you a simplified way to create line types using the Express Make Line type tool. In this section, you’ll get an in-depth view of the process of creating line types. You’ll also learn ow to create complex line types that cannot be created using the Express Make Line type tool.

Viewing Available Line Types

Although AutoCAD provides the line types most commonly used in drafting (see Figure 20.2) the dashes and dots may not be spaced the way you would like or you may want an entirely new line type.


AutoCAD stores the line types in a file called Acad. 1 in which is in ASCII format. When you create a new line type you are actually adding information to this file. Or if you create a new file containing your own line-type definitions it. too. will . have the extension .lin. You can edit line types as described here or you can edit them directly in these files.

To create a custom line type use the Line type command. Let’s see how this handy command works by first listing the available line types.

1. Open a new AutoCAD file

2. Enter -Linetype.J at the command prompt. (Don’t forget the minus sign at
the beginning of the word Linetype.)
3. At the? /Create/Load/Set prompt, enter?.J.
4. In the File dialog box that appears locate and double-click ACAD in the listing of available line-type files. You get the listing shown in Figure 20.3 which shows the line types available in the Acad. n file along with a simple description of each line. Figure 20.3 shows a few of the standard line types and the ISO and complex line types. (See Figure 4.8 for a complete listing of standard line types.)

Creating a New Line Type

Next, try creating a new line type.
1. At the? /Create/Load/Set: prompt, enter C.J.
2. At the Name of 1; netype to create: prompt, enter Custom.J as the name of your new line type.
3. Notice that the file dialog box you see next is named Create or Append Line type File. You need to enter the name of the line-type file you want to create or add to. If you pick the default line-type file ACAD your new line type is added to the Acad . 1 n file. If you choose to create a new line-type file, Auto- CAD opens a file containing the line type you create and adds .l in to the file name you supply.
4. Let’s assume you want to start a new line-type file. Enter Newline.J in the File Name input box


If you had accepted the default line-type file ACAD the prompt in step 5 would say Wait I check if i ne type already defi ned….This protects you from inadvertently ove~riting an existing line type you may want to keep

5. At the deseriptive text: prompt, enter a text description of your line type. You can use any keyboard character as part of your description but the actual line type can be composed only of a series of lines points and’ blank spaces. For this exercise enter
6. At the Enter pattern (on next 1; ne): prompt, enter the following numbers known as the line-type code (after the a that appears automatically):


If you use the Set option of the -Linetype command to set a new default line type you will get that line type no matter what layer you are on.

The Line type Code

In step 6 of the previous exercise you entered a series of numbers separated by commas. This is the line-type code representing the different lengths of the components that make up the line type. The separate elements of the line-type code are explained as follows

• The 1.0 following the a is the length of the first part of the line. (The a that begins the line-type definition is a code that is applied to all line types.)
•The first -.125 is the blank or broken part of the line. The minus sign tells AutoCAD that the line is not to be drawn for the specified length, which is 0.125 units in this example. e / • • .
•Next comes the positive value of 0.25. This tells AutoCAD to draw a line segment 0.25 units long after the blank part of the line .
•Finally the last negative value 125 again tells AutoCAD to skip drawing the line for the distance of 0.125 units

This series of numbers represents the one segment that is repeated to form the line (see Figure 20.4).You could also create a very complex line type that looks like a random broken line as in Figure 20.5

FIGURE 20.4:

FIGURE 20.4:

You may be wondering what purpose the a serves at the beginning of the linetype code. A line type is composed of a series of line .segments and points. The a which is supplied by AutoCAD automatically is a code that forces the line type to start and end on a line segment rather than a blank space in the series of lines. At times AutoCAD stretches the last line segment to force this condition as shown in Figure 20.6

Creating Complex Line Types

A complex line type is one that incorporates text or special graphics. For example if you want to show an underground gas line in a site plan you normally show a line with an intermittent G as shown in Figure 20.7. Fences are often shown with an intermittent X.

For the graphics needed to compose complex line types, use any of the symbols found in the AutoCAD font files discussed in Chapter 8. Just create a text style using these symbol fonts, and then specify the appropriate symbol by using its correspondIng letter in the line-type description.

To create a line type that includes text, use the same line-type code described earlier with the addition of the necessary font file information in brackets. For example say you want to create the line type for the underground gas line mentioned above. You add the following to your Acad .

FIGURE 20.7:

FIGURE 20.7:


You cannot use the -Linetype command to define complex line types. Instead you must open the Acad. 1 n file using a text editor such as Windows Notepad and add the line-type information to the end of the file Make sure you don’t duplicate the name of an existing line type

This has the effect of keeping the text at the same angle regardless of the line’s direction. Notice that in this sample the X and Y values are a “- .1; this will center the Gs on the line. The scale value of .2 will cause the text to be.2 Units high so the -.1 is half the height. In addition to fonts you can also specify shapes for line-type definitions. Instead of letters, shapes display symbols. Shapes are stored not as drawings, but as definition files, similar to text-font files. In fact, shape files have the same .shx  file name extension as text files and are also defined similarly. Figure 20.8 shows some symbols from shape files supplied with the companion CD-ROM.

FIGURE 20.8:

FIGURE 20.8:


Here is another example that uses the arrow shape you created in Chapter 19.

Just as with the Capline example the ARROW symbol in this example is scaled to .5 units with 0 rotation and an X and Y displacement of -.1. Here’s what it the Arrow line line type looks like when used with a spline.

Share This