home - about - advertise     
 
 
Sponsors
Navigation
Partners

 
AutoCAD Tutorial

AutoCAD 2004 Customization Tutorial: Using Shapes

By Alireza Parsai, June 10, 2003

You can insert shapes as symbols in your drawing files. You can also use them to define text fonts and/or linetypes. Shapes are defined with special text files called shape files. The extension file name for a shape file is SHP. Figure 1 shows a sample shape file in a Notepad window. You may use Notepad or another text editor for creating and modifying shape files.


Figure 1 - Click on image to enlarge

In this tutorial you will learn how to load and compile an existing shape file. Furthermore you will inset the shapes in a drawing. In some future tutorials I show you how to create shape files.

1. Download the following shape file. Figure 2 shows the shapes that are defined with this file.

custom.shp


Figure 2 - Click on image to enlarge

2. In AutoCAD, start a new drawing.

3. Invoke COMPILE command. The command creates a compiled shape file (SHX) based on an SHP file. The Select Shape or Font File dialog box appears [Figure 3].


Figure 3 - Click on image to enlarge

4. Locate and then open "custom.shp".

5. The compiled file (i.e. "custom.shx") will be created. Press F2 to view the message in Text window [Figure 4].


Figure 4 - Click on image to enlarge

6. Press F2 to close the Text window.

7. To be able to use the shape you should load the shape file into your drawing. Invoke LOAD command. The Select Shape File dialog box appears [Figure 5].


Figure 5 - Click on image to enlarge

8. Locate and open "custom.shx". The file is loaded and shapes are now available.

9. Invoke SHAPE command.

10. At first prompt enter "plant" as the shape name:

Enter shape name or [?]: plant 8

11. Specify the insertion point for shape:

Specify insertion point: 0,0 8

12. Specify the height (scale factor) for the current insertion of the shape:

Specify height <1.0000>: 1 8

13. Specify the rotation angle:

Specify rotation angle <0>: 0 8

14. Invoke Zoom-extents to view the inserted shape.

15. Invoke SHAPE.

16. Type ? and then press Enter twice. The list of available shapes appears in Text window [Figure 6].


Figure 6 - Click on image to enlarge

17. Press F2 to close the Text window.

18. Insert other shapes with various settings.
 

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 .