Log in / Register Print Em
Home > CAD > 2D Drafting > AutoCAD
Related topics: Learning Curve (AutoCAD Tutorials), Management
October 1, 1999
By: Bill Fane
It was a warm Friday morning, a perfect day for Grampa LearnCurve and his g
celebrate their 33rd wedding anniversary. Suddenly the phone rang. “It’s time,”
in-law. What’s with the Grampa LearnCurve bit? Yes, campers, Captain Learn
grandfather. Rebecca Nicole Milne, 8lb. 12oz., born July 9, 1999.
Last month we covered AutoCAD’s various noncontinuous linetype styles. Som
available styles aren’t appropriate, so you learned how to define your own.
Excuse me, last month you promised to discuss linetypes that include text and
linetype that indicates hot water supply in a piping diagram.
Not a problem. Just issue either the Layer or Linetype command and load in th
linetype. To read last month’s article on how to load a linetype.
Hold it! I also need linetypes for cold water and drains and compressed air and
Oh, all right, I’ll teach you how to create other linetypes that have text in them.
introduced complex linetypes in Release 13.
Last month we learned that AutoCAD holds linetype definitions in external files
You can create and edit these files with any standard text editor such as Notep
Release 14 holds its standard linetype definitions in a file called C:Program file
Note that Release 13 keeps the complex linetype definitions in a separate file c
but the principles and procedures are exactly the same. In fact, you can easily
complex linetype definitions from ltypeshp.lin into acad.lin.
You can create your own file or you can edit the standard one. If you choose th
remember rule number 2: Always keep a safe copy of the original file before yo
AutoCAD linetype customizing facilities,
CAD Software & Hardware
Features & Columns
CAD Software Tutorials
CAD Tips & Tools
CAD Video Gallery
Cadalyst Benchmark Test
CAD Events Calendar
Page 1 of 4AutoCAD linetype customizing facilities, part two | Cadalyst
Join us in enabling
the poorest of the
poor to improve their
Public Service Ads by
number 1 is Never break rule number 2. Rule number 3 is: The original files ar
installation CD-ROM when you don’t obey rules 1 and 2.
Linetype definitions with text
Before we begin, I must note a couple of points about linetype definitions. Onc
into a drawing, it is saved with the drawing. This means that if you send a draw
they don’t need your linetype definition file.
The other side of the coin is that if you change the definition of a linetype, you
reload it back into the drawing. Thus, if you experiment with the changes we ar
below, you must use the Linetype command to load in your changes each time
see the changes.
When you open your copy of acad.lin, you see the definition for Hot_water_sup
*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 first line includes the name of the linetype up to the comma. The rest of th
descriptive text that appears in the Linetype dialog box. The Release 14 and 2
boxes also have an Appearance field that shows a quick translation of the linet
The second line (shaded above) contains the meat of the definition. A compari
noncontinuous definition shows many similarities. For example, it must always
commas separate line segment definitions. Positive values indicate pen down,
segments. Negative values define pen up, or gap, segments. For best results,
should end with a pen-up segment. In our example (figure 1), the line starts wit
units long followed by a gap of 0.2 units,
then a bunch of stuff that we’ll come back to, and another gap of 0.2 units. The
repeats as necessary.
The only difference in a complex linetype definition appears in the section betw
Once again, the definition is divided into sections by commas. HW specifies th
appears spaced down the line. It is case-sensitive.
Standard is the text style name. You can specify any text style that currently ex
Figure 1. Here are two sample sections of the linetype, along with a copy of the
linetype definition. The red leaders show which portions of the linetype
definition control what.
Page 2 of 4AutoCAD linetype customizing facilities, part two | Cadalyst
Note that the text style must also exist in any other drawing into which you wan
Everything else is optional and defaults to zero if you omit it.
S=xx specifies a size or a scale factor for the text. If the specified text style has
S=xx specifies the exact size of the text. If the specified style has a size greate
defines a scale factor by which the text style size is multiplied. Note that LTSC
sizes of all the segment and gap lengths and further scales the text size.
R=xx specifies the rotation angle of the text relative to the line segments as yo
example of zero aligns the text parallel to the line segments. The text in a line
drawn right to left is upside down compared to a line segment drawn left to righ
instead of R=xx, the text alignment is always absolute relative to the origin. A=
text always remains horizontal.
X=xx is a horizontal offset distance for the start of the text. The example X=
-0.1 moves the start of the text 0.1 units back into the preceding line segment,
0.2 units long. To achieve the same effect, set the preceding gap length to 0.1
Y=xx is a vertical offset distance for the text. The text normally aligns from its lo
you want to center it in the complex linetype, give it a negative value equal to h
This can get a little messy because it is not scaled by the S=xx factor (but it is
LTSCALE). You usually get the best and most consistent results by using a tex
complex linetypes, even if this means creating a special text style just for this u
The only other slightly gnarly bit with regard to text placement is conveniently f
AutoCAD’s documentation. AutoCAD doesn’t automatically calculate the length
for the text from the specified characters. You must define it yourself. In our ex
change HW to HOT, the T crowds the start of the next pen-down line segment
specified for the text style also has an impact.
Back to the “bunch of stuff”
Let’s go back to the definition of the line segments. As we saw, the example lin
down segment 0.5 units long followed by a pen-up segment 0.2 units long. Thi
start of the text, but it also defines the start of the next line segment. In the exa
segment is a pen-up section 0.2 units long. If you put more or less text in the li
you must adjust this final pen up segment accordingly. Take a look at the Gas
acad.lin. Note how the last pen-up segment is 0.25 long instead of 0.20 to allow
character in GAS.
The problem is compounded because an “i” is typically narrower than an “m”, a
character widths depend on the font. You usually need to experiment a bit to g
for a specific text message.
Complex linetype definitions that include text most commonly identify the vario
schematic diagrams and the contour lines on maps. But I am sure a lot more a
lurking out there.
Complex linetype definitions also let you include custom shape symbols. Come
when I show you how.
And now for something completely different
Household pets, dogs in particular, can get jealous when you bring a new baby
hospital. To help ease the introduction, bring home a blanket that the baby has
gets used to the smell.
Page 3 of 4AutoCAD linetype customizing facilities, part two | Cadalyst
Bookmark it: digg propeller del.icio.us technorati yahoo faceb
E-mail Bill Fane
About Bill Fane
See contents by Bill Fane
About the Author: Bill Fane
About Cadalyst | Contact | Subscribe: Magazine | Subscribe: Newsletters
or in part
Page 4 of 4AutoCAD linetype customizing facilities, part two | Cadalyst