Shapes for AutoCAD Linetypes the Super Simple Way

Draw Shape with LinesLast 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):

  1. Use AutoCAD Lines to draw the shape you want (remember the rules outlined above).
    Draw Shape with Lines
  2. Choose the Make Shape tool (MKSHAPE command) found on the Tools panel of the Express Tools Ribbon tab.
    Make Shape tool on the Rib
  3. Provide a file name for your .SHP file.
    Naming the .shp file
    Note: Multiple “shapes” may be stored within a single .SHP file.
  4. Enter the name of your Shape. This is very similar to providing a name for an AutoCAD Block.
    Naming the AutoCAD Shape
  5. 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.
  6. Like creating a Block, you’re prompted for an insertion point. For this example I’m going to choose where the two lines intersect.
    Insertion Point for Shape
  7. 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.
    Selecting Objects
  8. AutoCAD creates a new Shape, and displays confirmation on the command line.
    Creation confirmation

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.

Linetypes the Super Simple Way Series

  1. Custom Linetypes the Super Simple Way
  2. Shapes for Linetypes the Super Simple Way
  3. Complex Linetypes with Shapes the Super Simple Way
  4. Text in Linetypes the Super Simple Way
Donnie Gladfelter
Donnie Gladfelter

Donnie is author of the book and Autodesk Official Press, AutoCAD and AutoCAD LT: No Experience Required, a columnist for AUGIWorld Magazine, Autodesk University speaker, and former member of the AUGI Board of Directors.

8 Comments

  1. 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. ?

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

  3. Hi

    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?

  4. 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?

    Thanks!

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

  6. Here's a couple of examples of shapes with curves.

    *10,5,BOUCLE1
    12,(2,0,-32),0

    *15,5,BOUCLE6
    12,(2,0,32),0

    Linetype Definition
    *DIRECTION,Arrows -//-> -//-> -//-> -//-> -//-> -//->
    A,.001,-1,[BOUCLE1,boucles.shx,s=0.1],-0.2,[BOUCLE6,boucles.shx,s=.1],-.2,[BOUCLE1,boucles.shx,s=0.1],-0.2,[BOUCLE6,boucles.shx,s=.1],-.2,[ZIG,ltypeshp,r=270,x=-.2,y=.2,s=.2],-1.0

    Another shape for centerline symbol
    *138,21,CL
    2,023,1,12,(-2,0,90),12,(0,-3,25),12,(2,0,90),2,016,001,03C,020,0

    I did an ATP course on Linetype Definitions in '03 I could send you if you like.

Leave a Reply to GovindCancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Discover more from The CAD Geek

Subscribe now to keep reading and get access to the full archive.

Continue reading

Discover more from The CAD Geek

Subscribe now to keep reading and get access to the full archive.

Continue reading