How to Add Text to a Custom AutoCAD Linetype

Text-based linetypes identify a system directly on the line. Common examples repeat labels such as GAS, WATER, ELEC, or FENCE. They are complex linetypes because the numeric dash-gap pattern includes a bracketed text descriptor.

This article focuses on the text component. For the general difference between pattern types, see Simple vs. Complex CAD Linetypes. For every transformation parameter, use the A, R, U, S, X, and Y reference.


How Text-Based Linetypes Work

A text descriptor tells AutoCAD which string to draw, which existing text style to use, and how to scale, rotate, and offset the string. The surrounding positive and negative values reserve drawn and blank distances so the word does not collide with the line.


When to Use Text Inside a Linetype

Utility Identification

Text is effective when several underground or overhead networks would otherwise use similar dash patterns. A repeated GAS or WATER label remains understandable in monochrome plots and copied details.

Property and Boundary Lines

Labels such as FENCE, EASEMENT, or R.O.W. can reinforce a boundary meaning. Confirm that the repeated word does not compete with dimensions, bearings, or legal annotations.

Safety and Access Lines

Restricted zones, access limits, fire lanes, and clearance lines may benefit from a repeated short label. The pattern should remain legible at the smallest approved sheet scale.

Process and Piping Lines

Industrial and process drawings can repeat a service abbreviation along long routes. Use a project legend and avoid putting too much specification information inside the line itself.


Choose the Text Displayed in the Pattern

Use Short and Recognizable Labels

Short labels repeat cleanly and are easier to read on curves. Prefer an accepted abbreviation such as ELEC over a long sentence. Define the abbreviation in the drawing legend.

Plan the Space Around the Text

The word occupies real length in the pattern. Add a gap before and after the descriptor, then use X offset only for fine positioning. If the pattern is too tight, letters will overlap adjacent dashes or symbols.

Avoid Overly Long Text Strings

A long string produces a long cycle and may disappear from short objects. If a full note is required, use a label, multileader, or repeated block rather than forcing the note into a linetype.


Prepare the Required AutoCAD Text Style

Select a Compatible Font

Choose a font available on every workstation that must display or plot the drawing. SHX fonts are common in CAD standards; TrueType fonts can offer broader characters but must be tested in PDF output and file exchange.

Use a Fixed or Zero Text Height

A dedicated style with a height of zero gives the LIN descriptor predictable control through S=. A fixed style height participates in the resulting size and can make tuning less intuitive.

Keep the Text Style Name Consistent

The descriptor references the style by name. If one template contains CADLT and another contains a different style with the same name, the linetype can display differently even though the LIN code is identical.

The Danger of Annotative Text Styles in Linetypes

How Annotative Scaling Can Be Applied Twice

The linetype already responds to linetype scaling, while an annotative style can introduce another scale context. The combination can produce a result far larger or smaller than the designer expected.

Why Text May Disappear or Become Extremely Large

Different annotation scales, viewports, and drawing contexts can make the embedded word appear absent in one view and oversized in another. The symptom is often mistaken for a LIN syntax error.

Why a Non-Annotative Style Is Safer

Use a dedicated non-annotative style for production linetypes. Control component size in the descriptor and control the complete pattern through the established linetype-scale standard.


Understand the Text Descriptor

Enter the Text String

The string is enclosed in quotation marks inside square brackets:

["GAS",CADLT,S=.10,U=0.0,X=-.10,Y=-.05]

Reference the Text Style

CADLT is the name of an existing text style in the drawing. The LIN file does not create that style or package its font. The template and transmittal workflow must provide them.

Add Scale, Rotation, and Offset Parameters

S=.10 sets component scale, U=0.0 requests upright orientation, and X/Y values move the word relative to the current insertion point. Start with simple values and adjust one parameter at a time.


Create a GAS Linetype Step by Step

Write the Linetype Header

*CADLT_GAS,Gas line ---- GAS ---- GAS ----

The name uses a company prefix and the description shows the intended repeated appearance.

Add the First Dash and Gap

Begin the pattern with a visible dash and a gap:

A,.50,-.20

Insert the GAS Text

Add the descriptor immediately after the first gap:

A,.50,-.20,["GAS",CADLT,S=.10,U=0.0,X=-.10,Y=-.05]

Add Spacing After the Text

Finish the cycle with another gap:

A,.50,-.20,["GAS",CADLT,S=.10,U=0.0,X=-.10,Y=-.05],-.25

The exact spacing must be tested with the selected font and drawing units.


Control Text Size and Position

Adjust the Text Scale

Change S= in small increments. Do not compensate for a global drawing-scale problem by distorting the component scale; first confirm the drawing settings described in the LTSCALE article and the CELTSCALE article.

Move Text Along the Line

Use X= to move the word backward or forward along its local baseline. A negative offset is commonly used to center the word within the blank distance reserved before it.

Move Text Above or Below the Line

Use Y= to position the text relative to the line. A small negative value often centers a font whose baseline would otherwise sit visibly above the stroke.


Keep Linetype Text Readable

Relative Rotation

R= follows the direction of the object. It is useful when the component must rotate with the path, but words can appear upside down when a line or polyline is drawn in the opposite direction.

Upright Rotation

U= is generally better for utility labels because it attempts to keep the text upright. The detailed difference and before-and-after code are in the backward and upside-down text guide.

Line Direction and Text Orientation

Test lines from left to right and right to left, vertical lines in both directions, and clockwise and counterclockwise curves. A pattern approved from one horizontal sample is not ready for production.


Test the Linetype on Different Objects

Straight Lines

Use long and short lines in several directions. Confirm that the word repeats at a readable interval and that the object begins and ends acceptably.

Polylines

Test with linetype generation enabled and disabled. The pattern can restart at each vertex or continue through the polyline depending on the object property and PLINEGEN; see the PLINEGEN guide.

Arcs and Curved Objects

Text is always drawn as a complete component. On a tight curve it can crowd the surrounding pattern or appear awkwardly rotated. Use the curved-object linetype guide for a full test procedure.


Common Text Linetype Problems

Text Does Not Appear

Confirm that the referenced text style exists, the line is long enough to reach the text portion of the cycle, and the scale is not making the word too small. Reload the definition and run REGEN.

Text Is Too Large or Too Small

Separate component scale from complete-pattern scale. Check S=, the text style height, annotative status, LTSCALE, and object scale rather than changing all of them at once.

Text Overlaps the Line

Increase the gaps around the descriptor or adjust X/Y offsets. Do not rely on a white background mask, because the text is part of a linetype rather than a normal text object with full annotation controls.

Text Uses the Wrong Font

The style name may exist but reference a different font in the receiving drawing. Standardize the style in the DWT template and package required font resources when permitted.

Annotative Text Creates Unexpected Scaling

Replace the referenced style with a dedicated non-annotative style, reload the linetype, and retest in every relevant viewport. Avoid repairing the symptom with extreme S= values.


Additional Text Linetype Examples

WATER

Use a short WATER label with enough blank space to remain clear beside civil or MEP backgrounds. Keep the name unique, such as CADLT_C_WATER.

GAS

GAS is compact and works well as a teaching example. In production, coordinate the pattern with color, layer name, lineweight, and the utility legend.

ELEC

ELEC or E can identify electrical routes, but confirm the client’s abbreviation standard and avoid confusion with existing and proposed status codes.

FENCE

FENCE can be useful on long site boundaries. For short fence segments or detailed symbols, a shape-based linetype or block workflow may be more readable.


Related Linetype Guides