Table of Contents

CadRecovery

from OpenCAD2D import CadRecovery

class CadRecovery(System.Object) ยท CadRecovery in the .NET reference

What RECOVER, AUDIT and the window's opening of a damaged file share: the recovered drawing as a document of no file of its own, and the lines that tell a report on the command line.

Properties and fields

Shown

.NET

Shown: ClassVar[int]

How many repairs the command line shows of a report; the rest are in the log.

Methods

Lines

.NET

@staticmethod
def Lines(report: DxfRepairReport) -> System.Collections.Generic.IReadOnlyList[str]

The lines that tell a report on the command line, as AutoCAD's audit ends: its summary first, then the first CadRecovery.Shown repairs, then how many more the log holds ("12 more in the log.").

NothingRecovered

.NET

@staticmethod
def NothingRecovered(report: DxfRepairReport) -> bool

Gets whether nothing could be recovered of a file: not one record of a DXF was found in it, or what was repaired could not be read at all (DxfRepairKind.Unreadable, not fixed), so that the drawing is empty and is not worth opening: a letter saved as plan.dxf.

Open

.NET

@staticmethod
def Open(path: str) -> tuple[CadDocument, DxfRepairReport]

Opens a damaged DXF file as DxfDatabase.Recover 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 (CadDrawingFile.Open) and audited with its errors fixed (DxfDatabase.Audit), the report being the audit's: a DWG that cannot be read at all is refused as the DWG reader refuses it.