Customized AutoCAD Linetypes

 

AutoCAD has a variety of linetypes in a file named “acad.lin”.  New linetypes can be created outside of AutoCAD in a word processor, such as Notepad or Wordpad.  What ever processor is used it should not add ASCI formatting characters to the code.  The new linetype is stored in a file with a .lin file extension.  A single file may contain the definitions of many linetypes.

 

The format for the linetype definition is

 

<*><linetype-name><, description>

 

followed by one line of pattern definition in the form

 

<alignment><, dashes><, spaces><, 0> …

 

Alignment is indicated by an ‘A’

Line segments(dashes) are positive numbers indicating their length

Spaces are negative numbers indicating their length

Single dots, or points, are indicated by ‘0’

 

An example:

 

*DD1, Long dash with a dot

A, .5,-.2, 0, -.2

 

The name and description are what will appear in the LINETYPE LOAD dialog box.  The description is optional, limited to 47 character.  If the description is not used, the comma is also eliminated.  However, there will be no description of the line in the dialog box.

 

The ‘A’ is the alignment.  AutoCAD will adjust the orientation of the line so that the linetype will start and end with an evenly divided line segment.

 

Other examples:

 

*DD2, Long and three dots

A, .5, -.2, 0, -.15, 0. -.15, 0, -.15

 

*DD3, One long four short

A, .75, -.25, .25, -.25, .25, -.25, .25, -.25, .25, -.25

 

Linetypes can include text.  Linetypes with text embedded in them can be used to represent phone, electric, water, sewer and other utilities.  Character embedded in the lines are always completely displayed.

 

Text is constructed with fonts that are resident when the text is created.  The same philosophy holds true with text embedded in linetypes.  Other fonts may be called if they have been previously loaded.

 

The space required for the text is not assumed in the definition of the text but in the space created within the linetype.

 

The following is the format for adding text within the linetype description

 

text”, Text style name, Scale, Rotation, X offset, Y offset]

 

“text” – The text to be used in the linetype is enclosed in “ ”’s. 

Text style name – the text style to be used, if none is specified, the current style is used

Scale – the scale used relative to the scale of the linetype.  If the text height of the style is zero the value is used as the height.

Rotation – R=relative rotation angle with respect to the line.  A= absolute rotation with respect to the origin.  The value can be appended with “d” for degree, “r” for radian, and “g” for grads.  If rotation is omitted, zero relative rotation used.

X offset – the shift of the text along the line.  If omitted the value is assumed to be zero.  The value not scaled by the scale value above, but is scaled by the linetype scale factor.

 

Y offset – the shift perpendicular to the line.  If the value is omitted or zero, the text is inserted without offset. The value not scaled by the scale value above, but is scaled by the linetype scale factor.

 

An example of text embedded in a complete linetype definition

 

*TV_Supply, ---- TV ---- TV ---- TV ----

A, .5, -.1, [“TV”, Standard, S=.1, R=0.0, X=0.0, Y=-0.05], -.3

 

To load a particular linetype, issue the LINETYPE command, and select the load option.  The line type is identified with the appropriate drive, subdirectories, and file name.