Application-Defined Data (AppData)

Starting at DXF R13, DXF objects can contain application-defined codes (AppData) outside of XDATA.

All AppData is defined with a beginning (102, “{APPID”) tag and according to the DXF reference appear should appear before the first subclass marker.

There are two known use cases of this data structure in Autodesk products:

  • ACAD_REACTORS, store handles to persistent reactors in a DXF entity

  • ACAD_XDICTIONARY, store handle to the extension dictionary of a DXF entity

Both AppIDs are not defined/stored in the AppID table!

class ezdxf.entities.appdata.AppData

Internal management class for Application defined data.

See also

__contains__(appid: str) bool

Returns True if application-defined data exist for appid.

__len__() int

Returns the count of AppData.

add(appid: str, data: Iterable[Sequence]) None

Add application-defined tags for appid. Adds first tag (102, “{APPID”) if not exist. Adds last tag (102, “}” if not exist.

get(appid: str) ezdxf.lldxf.tags.Tags

Get application-defined data for appid as Tags container. The first tag is always (102, “{APPID”). The last tag is always (102, “}”).

set(tags: ezdxf.lldxf.tags.Tags) None

Store raw application-defined data tags. The first tag has to be (102, “{APPID”). The last tag has to be (102, “}”).

discard(appid: str)

Delete application-defined data for appid without raising and error if appid doesn’t exist.