Table of Contents

Method PostToDb

Namespace
GeometryHelper.Dxf
Assembly
GeometryHelper.dll

PostToDb()

Adds the GEODATA made in code to the drawing of its BlockTableRecord, as AutoCAD's PostToDb: at the end of the OBJECTS section, owned by the block's extension dictionary, which is made where the block has none, under the name ACAD_GEOGRAPHICDATA, the GEODATA it held erased, as ezdxf replaces it; the block's handle written as its group 330 and the class GEODATA listed where the drawing lists none, as AutoCAD 2021 lists it (flags 4095, a count of 1).

public void PostToDb()

Remarks

The class is listed in the drawing's CLASSES section: a file of R2010 or later written with no CLASSES section is given the GEODATA and no class for it, and whether AutoCAD opens such a file is not confirmed.

Exceptions

InvalidOperationException

Thrown when the GEODATA is in a file already, has no block, or its block is in no file, is erased, is not model space, or is of a file older than R2010, which has no GEODATA.