CadDocumentInfo class

CadDocumentInfo class

Contains Cad document metadata.

DocumentInfo.pages_count counts the sheets the drawing offers under the load options it was read with.

Without explicit CadLoadOptions.layout_names those sheets are model space, which is always plottable and therefore always a sheet, plus every paper-space layout whose stored page setup has a positive width and height, narrowed by CadLoadOptions.layout_scope. Explicit layout names win outright instead: the sheets are then the supplied names the drawing carries, matched ordinally, with neither the scope nor the page setup screening them.

For a DWF the published page set is reported. The one count below one is zero, reported when the requested scope matches no sheet of a drawing that offers one: the metadata still describes the drawing, and zero says the scope selects nothing rather than failing the caller who asked what the drawing holds. A conversion under those same load options does fail.

The count is therefore not the size of CadDocumentInfo.layouts, which lists every plot configuration the drawing carries including those no sheet can be published from, and it does not predict how many pages a particular conversion emits.

The CadDocumentInfo type exposes the following members:

Methods

Method Description
get
get_file
get_string

Properties

Property Description
creation_date The document creation date.
format The document format.
height The height of the CAD document.
layers The layers in the document.
layouts The layouts in the document.
pages_count The document pages count.
property_names The enumerable of all properties that can be retrieved for the current document info.
size The document size in bytes.
width The width of the CAD document.

See Also