Click or drag to resize

DxfDocumentToSVG Method

Exports the active layout visible entities to an SVG string.

Namespace:  DXFReaderNET
Assembly:  DXFReaderNET (in DXFReaderNET.dll) Version: 20.12.2
Syntax
public string ToSVG(
	SVGUnits Units = SVGUnits.Pixel
)

Parameters

Units (Optional)
Type: DXFReaderNETSVGUnits
Output SVG units (width/height attributes and viewBox are expressed in these units).

Return Value

Type: String
SVG markup as a string.
Remarks
1. Computes drawing extents of current active layout entities. 2. Explodes inserts (block references) and merges their (transformed) entities into a flat list. 3. Normalizes coordinates so the minimum extents map to (0,0) and Y is inverted to match SVG coordinate system (Y down). 4. Approximates curves (splines, arcs, ellipses, mlines) to polylines using existing MathHelper utilities. 5. Emits basic SVG primitives: line, polyline, circle, polygon, text. Width = entity width when available, otherwise a small default (0.1 drawing units). White (#FFFFFF) is forced to black (#000000) for visibility. NOTE: This is a simplified exporter: no linetypes, line joins, transforms, text styling beyond size/color, hatches are not filled, z is ignored.
See Also