Protected
getGets all fonts used by entities in model space and paper space.
This method analyzes the DXF data to extract all font names used by text entities, MText entities, and insert entities throughout the drawing.
Input parsed DXF model
Array of font names used in the drawing
Protected
onProtected
parseProtected
processProcesses blocks defined in the DXF file.
This method iterates through all blocks in the DXF data and creates corresponding AcDbBlockTableRecord objects in the database.
Parsed DXF model containing block definitions
Target database to add blocks to
Protected
processProcesses block table records from the DXF file.
This method creates AcDbBlockTableRecord objects for each block record defined in the DXF tables section.
Parsed DXF data
Target database to add block table records to
Protected
processProcesses dimension style table records from the DXF file.
This method creates AcDbDimStyleTableRecord objects for each dimension style defined in the DXF tables section, including all dimension-related properties like text positioning, arrow settings, and tolerance settings.
Parsed DXF model containing dimension style definitions
Target database to add dimension style table records to
Protected
processProcesses entities in batches to maintain UI responsiveness.
This method breaks up the entity processing work into smaller chunks that are executed asynchronously. This is often referred to as "batch processing" or "cooperative multitasking," where the time-consuming task is broken into smaller pieces and executed in small intervals to allow the UI to remain responsive.
Parsed DXF data
Target database to add entities to
Minimum number of entities to process in each chunk
Object containing the starting percentage for progress tracking
Optional
progress: AcDbConversionProgressCallbackOptional callback for progress updates
Protected
processProcesses header variables from the DXF file.
This method extracts and sets various header variables such as color settings, angle base, angle direction, units, and point display settings.
Parsed DXF model containing header information
Target database to set header variables on
Protected
processProcesses layer table records from the DXF file.
This method creates AcDbLayerTableRecord objects for each layer defined in the DXF tables section, including their properties like color, linetype, lineweight, and visibility settings.
Parsed DXF model containing layer definitions
Target database to add layer table records to
Protected
processProcesses linetype table records from the DXF file.
This method creates AcDbLinetypeTableRecord objects for each linetype defined in the DXF tables section.
Parsed DXF model containing linetype definitions
Target database to add linetype table records to
Protected
processProcesses objects defined in the DXF file.
This method handles the conversion of DXF objects such as layouts and image definitions into their corresponding AcDb objects.
Parsed DXF model containing object definitions
Target database to add objects to
Protected
processProcesses text style table records from the DXF file.
This method creates AcDbTextStyleTableRecord objects for each text style defined in the DXF tables section.
Parsed DXF model containing text style definitions
Target database to add text style table records to
Protected
processProcesses viewport table records from the DXF file.
This method creates AcDbViewportTableRecord objects for each viewport defined in the DXF tables section, including their properties like center, corners, snap settings, and grid settings.
Parsed DXF model containing viewport definitions
Target database to add viewport table records to
Reads and converts data into an AcDbDatabase.
This method orchestrates the entire conversion process, including parsing, processing various components (fonts, linetypes, styles, etc.), and building the final database.
The input data to convert (string or ArrayBuffer)
The database to populate with converted data
Minimum chunk size for batch processing
Optional
progress: AcDbConversionProgressCallbackOptional progress callback
Promise that resolves when conversion is complete
Default database converter for DXF files.
This class extends AcDbDatabaseConverter to provide specialized functionality for converting DXF (Drawing Exchange Format) files into AcDbDatabase objects. It handles parsing DXF data, processing entities, blocks, tables, and other DXF-specific structures.
Example