Last week I started a discussion about creating Custom Linetypes the Super Simple Way. Today I’m going to continue that discussion by talking about yet another component to creating custom AutoCAD linetypes – shapes. As this post will outline, linetypes cannot contain Blocks, but may contain a lesser known object known as Shapes. AutoCAD Shapes are similar to AutoCAD blocks, however they have several restrictions that are not otherwise present when creating blocks.
My best bit of advice to anyone looking to create a custom shape; think simple. I say that due to the limitations of shape definitions within AutoCAD. These limitations include:
- Shapes must be composed of straight line segments; arcs are not supported.
- Each line segment must be drawn in one of the 16 supported directions; increments of 22.5 degrees.
- A line may be no more than 15 units long. Remember linetypes are multiplied by a scale factor (LTSCALE).
- Shapes must be continuous. Think of drawing with a pen without lifting the pen away from the paper.
To summarize; if you can’t draw it with an etch-a-sketch, you probably won’t be able to draw it with an AutoCAD Shape.
Like linetypes, AutoCAD Shapes are really nothing more than ASCII text files with a .shp extension. You could write your own shape file within an application like Notepad, but I wouldn’t advise it unless you get paid by the hour.
AutoCAD Shapes are stored outside the drawing, and are referenced from a file with a .shp extension. It’s worth noting AutoCAD LT users cannot create or insert shapes, but they can reference them within complex linetypes.
In this example I’m going to create a shape that will be used for a Silt Fence linetype (civil engineering E&S control):
- Use AutoCAD Lines to draw the shape you want (remember the rules outlined above).
- Choose the Make Shape tool (MKSHAPE command) found on the Tools panel of the Express Tools Ribbon tab.
- Provide a file name for your .SHP file.
Note: Multiple “shapes” may be stored within a single .SHP file.
- Enter the name of your Shape. This is very similar to providing a name for an AutoCAD Block.
- Enter the resolution. Generally the default 128 will more than suffice. Less detailed shapes probably won’t require this high of a resolution, so don’t be afraid to experiment with different values.
- Like creating a Block, you’re prompted for an insertion point. For this example I’m going to choose where the two lines intersect.
- Next you’ll select the objects you want included in your shape. Keeping the rules of AutoCAD Shapes in mind, select the objects you want to make into a Shape.
- AutoCAD creates a new Shape, and displays confirmation on the command line.
You can now use this shape file to create a complex linetype. Stay tuned for a future post where I’ll discuss creating a complex linetype using the shape file I just created in this post.
One final thing worth mentioning. While it’s certainly possible to reference shapes from any number of .SHP files, my personal preference is to create a single linetypes.shp file. Define every shape you use for linetypes within this one file, so you only have to send one shapefile to those you exchange drawings with.
Do you know how to edit the line type in .lin to add my .shp file? so i cam make that kind of line ——(my .shp)——…ect. ?
Hi, thanks for this amazing blog, I had to come up with a quick linetype and just wanted to comment to your statement
“Shapes must be composed of straight line segments; arcs are not supported.”
This is not true. You can simply up the resolution when you’re making a shapefile to 2048 from the default 128. I manage to add a circle (or something very closely resembling a circle) to my line types.
Hope this helps.
I found this article to be useful. I work in GIS and make use of AutoCAD Map 2012. I need to create different maps with 100s of linestyles. I need to create a line style which has a CIRCLE at start POINT and an ARROW at the end point. The circle and arrow appears only at the ends and I want different repeating shapes to be used between this circle and arrow head. Can u please tell me how i can create this type of a line style?
So here's a question…where should I save the .shp file so that it is automatically loaded when AutoCAD starts? I presume one of the supported folders that AutoCAD looks at when starting up?
AUGI doesn't keep ones that old, but I still have it on PDF. Not sure if I can attach files here, but if you email me I'll send it to you.
Tom – Thanks for your comment, and more importantly expanding on the post. If you have a link, or even a PDF of the course I'd certainly be willing to add it to the post.
Here's a couple of examples of shapes with curves.
*DIRECTION,Arrows -//-> -//-> -//-> -//-> -//-> -//->
Another shape for centerline symbol
I did an ATP course on Linetype Definitions in '03 I could send you if you like.