How to Create Custom LineTypes in AutoCAD

  • By
  • January 28, 2020
  • AutoCAD
How to Create Custom LineTypes in AutoCAD

How to Create Custom LineTypes in AutoCAD

AutoCAD is a very user-friendly software when it comes to drawing with the use of CAD. Although AutoCAD has its own unique library of line types which is quite useful for most of the common drawings. Also if you want to use any particular kind of line type you can make it in AutoCAD without using complex process and within a short time as well.

In this article, I will explain all about AutoCAD line types and how to modify them. The topics which I will discuss here are as follows.

  • Making line type containing text and symbols
  • Making line types with complex shapes
  • Modifying line type file
  • Importing and exporting line types
  • Making Line type with text and symbol

Let’s assume that we want a custom line type containing repeating patterns of text and symbol as shown in the image below.

In this case, the arrows are used from the character map and a letter is Mtext. Let’s start by making this line type pattern. Type MTEXT and press enter, now make a box to start writing your Mtext. To add the symbol in this Mtext box you need to select other options from the Symbol tool of Insert panel on the Text Editor tab as shown in the image below.

For Free, Demo classes Call: 8149467521
Registration Link: Click Here!

Now select the Arial font in the character map window and scroll down the list of symbols till you see solid arrows. Select the left direction arrow then click to Select then Copy button and close the character map.

Now right-click in the text box and select Paste from the contextual menu, you can also use Ctrl + V to paste the character. Type “A” and repeat the same process of adding the left-pointing arrow symbol as previously done. After adding text and symbol make sure the two lines are of equal length as shown in the first image. Our segment of line type is ready and we can convert it into a line type. For this, we will use MKLTYPE express tool. Now before using this tool, select the text and symbol and explode them. Select the text as well as arrow symbols then type X and press enter. By doing so we can convert a Mtext into simple Text or single-line text. MKLTYPE cannot recognize Mtext. So AutoCAD Classes in Pune need to convert Mtext into text using explode command before using the command.

Now type MKLTYPE on the command line and press enter, select line type and file window will show up. Save this custom line type at a specific location where you want to save it and give it a name. In case, I am using desktop as the specific location and naming it as Sample Ltype. The file extension for line type will be saved with “.lin”.

For Free, Demo classes Call: 8149467521
Registration Link: Click Here!

Now the AutoCAD will ask you to provide the name of line type. I will use ATEXT as the name of linetype. Press enter and it will ask you for a description, add the description which you want or press enter to skip this.

Now the command line will ask you to specify the starting point of the line definition. Select the leftmost point on this linetype segment and press enter. Again command line will ask you for the endpoint of the linetype segment. Click on the rightmost point of the linetype segment and press enter.

Now the AutoCAD will ask you to select the objects. Create a window to select the text, symbol and the lines in and press enter. At last, the command line will ask you to provide the ATEXT and linetype is now created and loaded as shown in the image below.

So, now our custom linetype is ready for use, let’s use it in a simple drawing. I will make a circle and a rectangle as shown in the image below and then change its linetype from the properties palette.

 After changing the linetype of the rectangle as well as the circle this is how my drawing looked like.

Just like any normal linetype, you can change the scale of this linetype too.

For Free, Demo classes Call: 8149467521
Registration Link: Click Here!

Making linetypes with complex shapes

In this case, AutoCAD Training in Pune  will show you the method of making a linetype with complex shape containing arc as well as line as shown in the image below.

Now, when you are using arc, The “MKLTYPE” command won’t recognize it as it is not a line and that’s why we need to convert this complete linetype segment into a “shape” which MKLTYPE command recognizes. To create the Shapefile type MKSHAPE on the command line and press enter, select shape window will show up. Provide the location where you want to save the your shapefile and name it. I am saving it on the same location as previous i.e. desktop with name Complex Shape. The shape will be saved with the SHP extension. After this command line of AutoCAD will ask you to specify the name of the Shapefile the same as the previous case. In this case, I am using CLT as the name of the shape, after typing the name press enter.

On the next ask, it will ask for a resolution value, simply press enter to accept the default value. The next step is to select the midpoint of the left line to specify the base point then select the complete drawing and press enter.

This will create a CLT Shapefile and it can be used for making our linetype. Type SHAPE and press enter, command line will ask you to enter the name of shape which you want to insert, type CLT and press enter again. The cursor will now show the shape of your design, click on the midpoint of the left line again as marked in the red circle in the image above. This will overlap the shape of existing geometry.

On the next asks of height and rotation angle simply press enter to accept the default values and exit the command. Now have the shape clearly overlapping the existing drawing.

To start creating the linetype from this shape you need to start with MKLTYPE command. Type MKLTYPE and press enter. Now the complete process is the same as before – Specify a location – give it a name. I am using the desktop location and “Complex line” as the name.

Now the command line will ask you for the name of linetype, type CLINE, and press enter. Skip adding any description. Command-line will again ask you to add starting point, click on the midpoint of the line as shown in the red circle and second point right opposite as shown with the green circle as shown in image below.

Now click on the shape to select it and press enter. The new linetype is now added named CLINE and will be loaded in the drawing.

For Free, Demo classes Call: 8149467521
Registration Link: Click Here!

Using custom linetypes in AutoCAD

Understanding and Modifying linetype files with the help of AutoCAD Course in Pune.

All the characters of this file have a particular meaning in AutoCAD. Let’s discuss all the components of this linetype file, they are marked with numbers and I am explaining these numbers here. The new linetype starts with * sign followed with the name of linetype. In this case, the name of linetype is ATEXT. This is the description of the linetype that shows up on Linetype window, this is added after putting a comma next to the linetype name. The A character here indicates that the construction of linetype starts from this point. The Numerical value “1” here indicates the actual length of the dashed line, this value can be anything and it will indicate the length of the dash. the value “-0.25” is the length of the gap, any value with a negative sign indicates the gap length of linetype. The value shown inside the square bracket is for the entering text. In this case, A is the text in Standard text style and “y=0.1” is the offset value of text along the Y-axis “S=0.2” is the scale of text and 0.4 is the gap length. 

The value “1” again here is the length of the dashed line and then the whole pattern repeats itself. Here the length of the first segment is 1 then 0.25 gap than “A” text in standard text style than a gap of 0.4 and again segment length of 1 and then pattern repeats. You can reuse the same set of codes inside a single “.lin” file to create different linetypes with different text or segment lengths. An example is shown in fig below.

In the example shown above, we have three different linetypes with ATEXT, BTEXT, and CTEXT as names of linetypes and slightly different properties.

Importing and exporting linetypes

There are multiple commands in AutoCAD with which you can export or import linetypes. Actually, you need to use a combination of different techniques to import linetypes of different types from one drawing to another. Let’s start using MKLTYPE command to create the most basic linetypes that contain simple text and lines. When you use MKLTYPE command to make the linetype, AutoCAD creates a .lin file that contains the data related to the linetype. To use this linetype type LT in command line and press enter. This will open Linetype Manager window, click on the Load button and then click on the File button in the next window.

When the Load linetype window opens up, it contains the list of linetypes available in your selected .lin file. Select all the linetypes to load from this list & click OK. You will find that the linetypes will be loaded in the Linetype manager and now you can use them whenever you want in your drawing. Click OK.

For Free, Demo classes Call: 8149467521
Registration Link: Click Here!

Now the method is a little different when your linetype contains different shapes. In the case of linetype containing text all you have to be careful about is the text style which should be available in the drawing where you are importing the linetype. AutoCAD automatically creates an SHX file in the same location where your .shp file is saved. Use LOAD and press enter, select the SHX file created and click on Open. The shape will be loaded in the current drawing. After adding the shape file and loading the shape in your drawing you can import the linetype file now. Now, whenever you want to use the linetypes just type LT and press enter then select the Load button then click on the File button and load the .lin file which contains shape defined linetype. The linetype will be added and now you can use this linetype in your current drawing.

Author:-
Vijay Gujar

Call the Trainer and Book your free demo class for now!!!

call icon

© Copyright 2020 | Sevenmentor Pvt Ltd.

 

 

Submit Comment

Your email address will not be published. Required fields are marked *

*
*