Table of Contents

Namespace CADability.DXF

Classes

DxfImportLimitException

Thrown by the DXF/DWG import when the INSERTs and DIMENSIONs of the drawing would create more objects than the global setting "DxfDwg.MaxImportObjects" allows (1,000,000 by default; a value of 0 or less also means the default). Every INSERT gets its own copy of its block, so nested blocks multiply, and a small or crafted file could exhaust the memory.

Export

Writes the model space of a Project to a DXF or DWG file with ACadSharp. Points, lines, ellipses, polylines, splines, paths, text, dimensions, hatches and blocks become the corresponding DXF entities; faces, shells and solids are written as polyface meshes (or as MESH entities when the setting "DxfImport.UseMesh" is set). Layers, line patterns, text and dimension styles are created on demand. Export(string, string) with the formats "dxf" and "dwg" uses this class; for direct use create an instance and call WriteToFile(Project, string) or WriteToByteArray(Project).

ExtendedEntityData

The extended entity data (XDATA) of a DXF entity for one application: the ApplicationName and the list of (XDataCode, value) records in Data. The DXF import attaches one such object per application to the user data of the imported object (under the application name) and the DXF export writes it back, so that application specific data survives a round trip through CADability; the values keep the types of the DXF records (string, GeoPoint, GeoVector, double, short, int) also after JSON serialization.

Import

Imports a DXF file, converts it to a project

Interfaces

IDxfProgress

Receives the progress of a DXF or DWG import, see Import(string, IDxfProgress). The progress runs from 0 to 100 percent in phases: each phase sets the size of its steps with SetStepIncrement(double) and then reports the steps it has done with DoStep(int).

Enums

XDataCode

The group codes of the records of DXF extended entity data (XDATA), used as keys in Data. The numeric value of each member is the DXF group code: 1000 string, 1001 application name, 1002 control string, 1003 layer name, 1004 binary data, 1005 database handle, 1010/1020/1030 and the following triples the x, y and z coordinate of a point, world space position, displacement or direction, 1040 real, 1041 distance, 1042 scale factor, 1070 16 bit and 1071 32 bit integer.