banner



How To Create Custom Linetype In Autocad

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 __ __ . __ __ . __ __ . __ __ . __ __ .
A,.5,-.25,.5,-.25,0,-.25

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 ----
A,.5,-.2,["HW",STANDARD,S=.1,R=0.0,X=-0.1,Y=-.05],-.2

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.

How To Create Custom Linetype In Autocad

Source: http://www.thecadmasters.com/2013/01/10/creating-custom-autocad-linetypes/

Posted by: thibaultdianow.blogspot.com

0 Response to "How To Create Custom Linetype In Autocad"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel