The linetype defines the rendering pattern of linear graphical entities like LINE, ARC, CIRCLE and so on. The linetype of an entity can be specified by the DXF attribute linetype, this can be an explicit named linetype or the entity can inherit its linetype from the assigned layer by setting linetype to 'BYLAYER', which is also the default value. CONTINUOUS is the default linetype for layers with an unspecified linetype.

Ezdxf creates several standard linetypes, if the argument setup is True when calling new(), this simple linetypes are supported by all DXF versions:

doc ='R2007', setup=True)

In DXF R13 Autodesk introduced complex linetypes which can contain text or shapes.

Linetype Scaling

Global linetype scaling can be changed by setting the header variable doc.header['$LTSCALE'] = 2, which stretches the line pattern by factor 2.

The linetype scaling for a single entity can be set by the DXF attribute ltscale, which is supported since DXF R2000.