Creating Custom AutoCAD Linetypes

As one of the instructors here at CAD Masters, I’d have to say one of my favorite topics to teach is creating custom AutoCAD linetypes. While not too difficult, it tends to be a task many users choose to leave to their company’s CAD manager. If, in the event that you know exactly what linetypes you would like to create yourself, use either of the two methods below to do so.

Adding to the Existing acad.lin File

The first method consists of adding the definition of your custom linetype to your acad.lin file. To find the location of this file, at the command line, type (findfile acad.lin). The acad.lin file is where the definitions of many of the default linetypes reside. Let’s take a look at one of the existing definitions to see how they work.

*BORDER,Border __ __ . __ __ . __ __ . __ __ . __ __ .

Every linetype definition consists of two lines of text. The first line consists of a standard asterisk, the linetype name, and a description including a text preview of the linetype. The second line is where it starts to get tricky. First we have a standard letter A to specify the alignment type (always A in AutoCAD linetypes), then a series of values to define the actual pattern. Positive values represent a line of that length, negative values represent a space of that length, and zeroes represent periods. Below you can see how these values relate to the actual linetype.Linetypes with text become a bit more complicated by including a portion specific to the text in brackets. This bracket portion defines the linetype text, text style, text size, rotation angle, horizontal offset, and vertical offset.

*HOT_WATER_SUPPLY,Hot water supply ---- HW ---- HW ---- HW ----

The most difficult part about this is determining the horizontal and vertical offsets, but even those are not too hard to figure out by experimenting and giving your linetype a few test runs.  Choose a text style that exists in all of your drawings, such as the Standard text style.  Make sure the text height for that style is set to 0 in the drawing so that the text height is controlled by the height setting in the linetype (s=.1) and the LTSCALE, rather than a static value.

At the bottom of the acad.lin file is space to add your own custom linetype. Compose your own, and save the file. If done correctly, you should now be able to load this file using the LINETYPE command. Load your new custom linetype, and you’re done!

Custom AutoCAD Linetypes with Express Tools

The second method of linetype creation doesn’t require you to create your own linetype definition in the acad.lin file, but does require AutoCAD Express Tools to be installed. On the Express Tools tab of the Ribbon, expand the Tools panel to find the Make Linetype and Make Shape buttons.

Make Linetype Make Shape ScreenshotThe advantage to using the Express Tools method is that it allows you to easily create shapes and incorporate these into your linetypes. Draft your shape, and then use the Make Shape tool to create a .shp file for it. Use the SHAPE command to insert your shape into your drawing, and draft the pattern of your linetype.Custom AutoCAD Linetype Shape ExampleNow, use the Make Linetype tool to create your linetype based on this pattern. It will prompt you for a location for the new .lin file and the linetype’s name and description. When it asks for the starting and ending points for the line definition, specify the region that will be repeating throughout the linetype.Custom AutoCAD Linetype Shape GapSelect the objects that compose your linetype, and ta da! You have your own custom linetype incorporating a custom shape.Custom AutoCAD Linetype With Shape FinalIn order for linetypes using shapes to work properly, both the .lin and .shp need to be in a Support File Search Path, such as the location of your acad.lin file.

  1. Thank you for your input… it has been awhile since I played with line types (ver 2000) its nice to know not much has changed

  2. Thanks for the great info!
    Question: When I do this I have to set the linetype scale very small for the shape to show up at the size in which I created it. Am I doing something wrong?

  3. thank you very much admin for your important news to share with us. And more thanks for i get best idea read this article about this topics. many more days i was searched this topics, finally i got it.

  4. You have posted such helpful content. Thank you so much for sharing this information with us. Hopefully, it will help other people in the future.

Leave a Reply

Your email address will not be published.

Back to blog

Copyright ©2017, CAD Masters, Inc.. All Rights Reserved.