home - about - advertise     

AutoCAD Tutorial

AutoCAD 2004 Customization Tutorial: Creating Linetypes with Express Tools

June 20, 2003

Express Tools offer a command called MKLTYPE that makes the process of defining new linetypes very easy. You can create simple and/or complex linetypes with this command. Here we create a complex shape linetype with this command. If you are not familiar with linetype definition and/or shapes please read the relevant tutorials first:

AutoCAD 2004 Customization Tutorial: Simple Linetypes

AutoCAD 2004 Customization Tutorial: String Linetypes

AutoCAD 2004 Customization Tutorial: Shape Linetypes

AutoCAD 2004 Customization Tutorial: Using Shapes

AutoCAD 2004 Customization Tutorial: Shapes with Straight Lines, Part 1

AutoCAD 2004 Customization Tutorial: Shapes with Straight Lines, Part 2

AutoCAD 2004 Customization Tutorial: Adding Arcs to Shapes

Note: Linetypes are defined within text files that hold the LIN extension. There are two default LIN files "acad.lin" and "acadiso.lin". You may add the linetype definition to one of these files or create your own LIN file. The latter is safer as you are not changing the contents of existing files.

1. Download the following files:



Note: If you are using an earlier release of AutoCAD download the following files:



2. Move "express_shapes.shx" to a folder in AutoCAD search path. The file defines 2 shapes called SQUARE_WAVE and SINUSOIDAL_WAVE.

Note: If you are not familiar with AutoCAD search path, read the following tutorial:

AutoCAD 2004 Customization Tutorial: Search Paths

3. Open the drawing file in AutoCAD.

4. In command line type load and then press Enter. The Select Shape File dialog box appears [Figure 1]

Figure 1 - Click on image to enlarge

5. Locate and open "express_shapes.shx". The shapes will be loaded in the drawing file.

6. In command line type shape, then insert the SINUSOIDAL_WAVE:

Command: shape 8
Enter shape name or [?]: sinusoidal_wave
Specify insertion point: 0,0
Specify height <1.0000>: 0.25
Specify rotation angle <0>: 0

Note: The 8 denotes pressing Enter. User entries are in bold.

7. An Insertion of the shape appears on the origin point.

8. Invoke MKLTYPE [Figure 2].

Figure 2

9. Save the new linetype file as "express_lines.lin" [Figure 3].

Figure 3 - Click on image to enlarge

10. Specify the name of the new linetype:

Enter linetype name: sinus 8

11. Enter the description for the new linetype:

Enter linetype description: Sinusoidal Wave 8

12. Specify the starting and ending points of the line segment:

Specify starting point for line definition: 0,0 8
Specify ending point for line definition:
1.5,0 8

13. Select the shape as the defining object for the new linetype.

14. Press Enter to exit the command. The new linetype is defined and loaded.

15. Select the objects to the right of the drawing.

16. Select the "sinus" linetype from the linetype list on Object Properties toolbar [Figure 4].

Figure 4

17. Press Esc. The new linetype is applied to the objects [Figure 5].

Figure 5 - Click on image to enlarge

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 >>

CADdigest Weekly
Email (required) *

A week's worth of articles will be emailed to you. See latest issue .