Drawing Header Section

The drawing settings are stored in the header section, which is accessible by the header attribute. See the online documentation from Autodesk for available header variables.

class HeaderSection

Get drawing settings by index operator like: drawing.header['$ACADVER']

HeaderSection.__setitem__(key, value)

Set drawing settings by index operator like: drawing.header['$ANGDIR'] = 1 # Clockwise angles


Stores the custom drawing properties in CustomVars object.

class CustomVars

Stores custom properties in the DXF header as $CUSTOMPROPERTYTAG/$CUSTOMPROPERTY values. Custom properties are just supported at DXF version AC1018 (AutoCAD 2004) or newer. With ezdxf you can create custom properties on older DXF versions, but AutoCAD will not show this properties.


List of custom drawing properties, stored as string tuples (tag, value). Multiple occurrence of the same custom tag is allowed, but not well supported by the interface. This is a standard python list and it is save to change this list as long you store just tuples of strings in the format (tag, value).


Count of custom properties.


Iterate over all custom properties as (tag, value) tuples.


Removes all custom properties.

CustomVars.get(tag, default=None)

Returns the value of the first custom property tag.


True if custom property tag exists, else False.

CustomVars.append(tag, value)

Add custom property as (tag, value) tuple.

CustomVars.replace(tag, value)

Replaces the value of the first custom property tag by a new value. Raises DXFValueError if tag does not exist.

CustomVars.remove(tag, all=False)

Removes the first occurrence of custom property tag, removes all occurrences if all is True. Raises DXFValueError if tag does not exist.