Method Open
- Namespace
- OpenCAD2D
- Assembly
- OpenCAD2D.Core.dll
Open(string)
Opens a DWG or DXF file and shows it, or shows it where it is open already, as File > Open does with the file read at once. Each extension is told of the drawing and the line "Opened plan.dxf: 12 entities, 3 layers." goes to the command line.
public CadDocument Open(string path)
Parameters
pathstringThe path of the file.
Returns
- CadDocument
The drawing.
Exceptions
- ArgumentNullException
Thrown when the path is null.
- ArgumentException
Thrown when the path is empty.
- InvalidOperationException
Thrown when the file cannot be opened (the message is what the command line said), with no window, or while a command runs in the drawing shown.