Table of Contents

Method IsDwg

Namespace
OpenCAD2D
Assembly
OpenCAD2D.Core.dll

IsDwg(string)

Gets whether a file is a DWG: its first six bytes AC1 and three more digits, as "AC1015" of AutoCAD 2000 and "AC1032" of AutoCAD 2018 are. A DXF, of text or binary, never starts so.

public static bool IsDwg(string path)

Parameters

path string

The path of the file.

Returns

bool

Whether the file is a DWG; false for a file shorter than six bytes.

Exceptions

ArgumentNullException

Thrown when the path is null.

IOException

Thrown when the file cannot be read.