[Search tip detail and code files using keywords, tip number, author name, etc ]
 
Create Custom Linetypes
Tip# 3347 By Hardik Dhingani On 22-Feb-2010
1
Rated By 1 users
Categories : Linear Objects
Software type : AutoCAD 2010
Rename File To : No Files to download.
Create an AutoCAD linetype in two different ways.

Hardik Dhingani outlines two ways to create a linetype in AutoCAD: in a text editor (such as Notepad) or directly in the ACAD.LIN file from the Command prompt.

Method 1: Open your text editor program, type the codes shown below into the text file, and save it. The file name can be anything as long as it is an LIN file type (in this example, it's ATP171.LIN).
*ATP171,DASHDOTDOT
A,0.2-0.15,0,-0.15,0,-0.15

Save the file in your AutoCAD support folder: C:/Documents and Settings/Your User Name/ApplicationData/Autodesk/AutoCAD20XX/R17.0/enu/Support/ATP171.lin

In AutoCAD, open the ATP171 line file and type LINETYPE on the Command line. In the Linetype Manager, click on DASHDOTDOT, make it current, and choose OK.

"Now, draw a line of any length, and you will see the linetype you expected!"

Method 2: Here we shall see how to create the same line by working directly in AutoCAD. Let's use the same file name, ATP171, or you can create a file name of your choice. Follow these steps.
1. Type -Linetype on the Command line, making sure to include the hyphen.
2. Enter an Option [? / Create / Load / Set]
3. Type Create
4. Select the file to save it in
5. Enter name of linetype to create
6. Enter ATP171
7. Highlight the file name ATP171 and click on Save
8. Enter the descriptive text: DASHDOTDOT
9. On the line below that, enter the codes and linetype pattern:
0.2,-0.15,0,-0.15,0,-0.15

"You're done! In this way you can create plenty of linetypes. Note: It is advisable to save all the new linetypes created into ACAD.LIN so future migration will ensure the safe transfer of your custom linetypes. When you save the linetypes this way, the codes are embedded into the custom location as shown below:

Hardik recommends the following guidelines to keep in mind when creating linetypes:

  • All linetypes must begin with a dash.
  • Enter zeros for dots.
  • Enter negative real numbers for spaces. The value defines the length of the space in drawing units.
  • Enter positive real numbers for dashes. The value defines the length of the dash in drawing units.
  • Separate each dot, dash, or space value from the next with a comma.
  • Use a space between a dot and a dash."

Notes from Cadalyst Tip Patrol: Often, the standard linetypes that come with AutoCAD don't suit your needs, but it's relatively easy to create your own custom versions. You can create linetypes in several different ways, but the coding for them is the same no matter where make them. The file ACAD.LIN is the standard linetype file that comes with AutoCAD. (If you are going to edit this file, make a backup copy of the original first.) If you use custom linetypes in a file, and you distribute that file, make sure to send the recipients your custom linetype file also, or the custom line won't display properly for them.

Tested in AutoCAD 2010

 

 

Average Rating:
1


User comments
Comment by Anonymous
Posted on 2010-02-23 08:08:11
This is fine if all your linetypes have fixed length segments but when will AutoDesk ever allow you to create a linetype with a variable length segment? This is something that MicroStation has allowed for at least 15-20 years.