Table of Contents

Method Open

Namespace
OpenCAD2D
Assembly
OpenCAD2D.Core.dll

Open(string, out DxfRepairReport)

Opens a damaged DXF file as Recover(string, out DxfRepairReport) recovers it, as a document named after the file with " (recovered)" behind it and no file of its own, so that saving it asks where and never writes over the damaged file: plan.dxf (recovered). A DWG, known by its first bytes, is read by the DWG reader (Open(string)) and audited with its errors fixed (Audit(bool)), the report being the audit's: a DWG that cannot be read at all is refused as the DWG reader refuses it.

public static CadDocument Open(string path, out DxfRepairReport report)

Parameters

path string

The path of the file.

report DxfRepairReport

What was found and repaired.

Returns

CadDocument

The document.

Exceptions

ArgumentNullException

Thrown when the path is null.

IOException

Thrown when the file cannot be read.

FormatException

Thrown for a binary DXF, or a DWG that cannot be read.

NotSupportedException

Thrown for a DWG of a version that is not read.