Work with Linetypes

A linetype is a repeating pattern of dashes, dots, and blank spaces. A complex linetype is a repeating pattern of symbols. To use a linetype you must first load it into your drawing. A linetype definition must exist in a LIN library file before a linetype can be loaded into a drawing. To load a linetype into your drawing, use the Load method.

For more information about working with linetypes, see “Overview of Linetypes” in the User's Guide.

NoteThe linetypes used internally by AutoCAD should not be confused with the hardware linetypes provided by some plotters. The two types of dashed lines produce similar results. Do not use both types at the same time, however, because the results can be unpredictable.

Load a linetype into AutoCAD

This example attempts to load the linetype “CENTER” from the acad.lin file. If the linetype already exists, or the file does not exist, then a message is displayed.

Sub Ch4_LoadLinetype()

	Dim linetypeName As String
	linetypeName = "CENTER"

	' Load "CENTER" line type from acad.lin file
	ThisDrawing.Linetypes.Load linetypeName, "acad.lin"
	Exit Sub

	MsgBox Err.Description

End Sub