Class CadExtraction
- Namespace
- OpenCAD2D
- Assembly
- OpenCAD2D.Core.dll
The Data Extraction of AutoCAD 2021 as the presenter runs it: the objects of the current drawing (all, or those selected) and of other drawing files are read, the object types and properties chosen are kept, identical rows are combined into one with a Count, the rows are filtered and sorted, and the result goes to a table in the drawing, whose cells are linked to a data link of the data extraction's own, and to a file of .xlsx, .csv or .txt. The table is updated by DATALINKUPDATE (or Update Table Data Links) by running the extraction again from its .dxe file.
public static class CadExtraction
- Inheritance
-
CadExtraction
- Inherited Members
Properties
- Categories
The categories of properties, in the order the Select Properties page lists them.
Methods
- Properties(CadDocument, CadExtractionSettings)
The properties of the objects of the types chosen, as the Select Properties page lists them: the General, Geometry, Misc and Drawing properties the objects have, an Attribute for each tag of the blocks, a Dynamic Block for each dynamic property; by category (as Categories orders them) and name. The categories the settings leave out are not listed.
- Rerun(CadDocument, DxfDataLink)
Runs a data extraction again from its link, as updating a data extraction table does: the link's connection string is the .dxe file (a relative one is of the drawing's folder), whose settings are run on the drawing as it stands.
- Run(CadDocument, CadExtractionSettings)
Runs the extraction: the objects read, those of the types chosen kept, a column for each property chosen (and the Count and Name columns the settings show), identical rows combined with their count, the filters applied and the sorts, the first the main one, the rows not moved by a sort kept in the order they were read.
- Types(CadDocument, CadExtractionSettings, out IReadOnlyList<string>)
The object types the sources hold, as the Select Objects page lists them, after its display options: every kind of object and every block by name, with how many; the blocks of the current drawing that are defined and not inserted too (count nought) unless UsedOnly leaves them out. By name, letters of either case alike.
- WriteFile(string, CadSheet)
Writes cells to a file by its extension:
.xlsxa workbook of one sheet (numbers as numbers),.csvcomma separated values,.txttab separated; any other extension, as the .xls and .mdb AutoCAD also writes, is refused.