AutoCAD 2004 Customization Tutorial: String Linetypes
June 18, 2003
String linetypes are complex linetypes that
consist of some text. Any string linetype may contain some
dashes, spaces, and/or dots. You should be familiar with
defining simple linetypes to be able to define String linetypes.
For more information read the following tutorial:
►
AutoCAD 2004 Customization
Tutorial: Simple Linetypes
Note: Linetypes are defined within
text files that hold the LIN extension. There are two default
LIN files "acad.lin" and "acadiso.lin". You may add the linetype
definition to one of these files or create your own LIN file.
The latter is safer as you are not changing the contents of
existing files.
1.
Download R16_String_Linetypes.dwg.
Note: If you are using an earlier release of AutoCAD
download:
R15_String_Linetypes.dwg.
2.
Open the file in AutoCAD.
3. In
command line type Notepad and then press Enter twice. The
Notepad window appears.
4. In
Notepad window type the proper text [Figure 1].

Figure 1 - Click on image to
enlarge
Notes:
-
The first line is called the linetype header.
The header starts with an asterisk (*). The asterisk is followed
by the linetype name. You may add a comma followed by some
descriptive text about the linetype.
-
"A" is the alignment character. It always
appears in the beginning of the definition line.
-
Positive numbers stand for dashes. Thus .75
means a dash which is 0.75 units long.
-
Negative numbers stand for spaces. Thus -1.5
means a blank space which is 1.5 units long.
-
You need to define one segment of the linetype
only.
-
The text is defined within brackets. The general
syntax is:
["text",textstylename,scale,rotation,xoffset,yoffset]
-
"Standard" text style is the safest text style
as it is available in all drawing files.
-
If in text style definition height is set to 0.0
the scale means text height, otherwise it is used as a scale
factor [Figure 2].

Figure 2 - Click on image to
enlarge
-
You may enter the rotation angle of the text as
a relative value. For example R=0.0 means the text is aligned
with the line or curve. If you type A=0.0 then the text will be
horizontal with respect to the current UCS.
-
X-offset and Y-offset values help us to place
the text properly.
5.
Save the file as "string_lt.lin".
6. In
AutoCAD command line, type LT and then press Enter. The
Linetype Manager dialog box appears [Figure 3].

Figure 3 - Click on image to
enlarge
7.
Click Load. The Load or Reload Linetypes dialog box
appears [Figure 4].

Figure 4
8.
Click File.
9. In
Select Linetype File dialog box locate and then open "string_lt.lin"
[Figure 5].

Figure 5 - Click on image to
enlarge
10.
The DANGER linetype will be added to the Load or Reload
Linetype dialog box [Figure 6].

Figure 6
11.
Select the linetype in the list and then click OK. The linetype
will be loaded [Figure 7].

Figure 7 - Click on image to
enlarge
12.
Click OK.
13.
Select the objects on drawing environment.
14.
From the Linetype Control drop down list select DANGER
[Figure 8].

Figure 8
15.
Press Esc to deselect objects. The objects linetype is altered
to DANGER [Figure 9].

Figure 9 - Click on image to
enlarge
About the Author
Alireza Parsai is the founder of cadpanel.com. He is a
mechanical engineer with more than 12 years experience with
AutoCAD. Alireza is an Autodesk Authorized Author, the AutoCAD
consultant for Al Khawarizmi Institute, a contributing editor
for Augiworld magazine, a writer for CAD Digest, an instructor
for AUGI Training Program, and an elected speaker for Autodesk
University 2002. He has written 7 books in Farsi, 3 booklets in
English, and more than 30 articles for different magazines and
newsletters. You can reach him at
alireza.parsai@cadpanel.com or visit his website
www.cadpanel.com.
|