Method Write
- Namespace
- GeometryHelper.Dwg
- Assembly
- GeometryHelper.dll
Write(DxfDatabase, string, string)
Writes a drawing database as a DWG file at a path, replacing whatever is there.
public static void Write(DxfDatabase database, string path, string version = "AC1032")
Parameters
databaseDxfDatabaseThe drawing.
pathstringThe path of the file.
versionstringThe version of the file: AC1032 (AutoCAD 2018), AC1027 (2013), AC1024 (2010), AC1021 (2007), AC1018 (2004) or AC1015 (2000).
Exceptions
- ArgumentNullException
Thrown when the drawing or the path is null.
- NotSupportedException
Thrown when the version is not written; the message names it.
- IOException
Thrown when the file cannot be written.
Write(DxfDatabase, Stream, string)
Writes a drawing database as a DWG file to a stream, where it stands.
public static void Write(DxfDatabase database, Stream stream, string version = "AC1032")
Parameters
databaseDxfDatabaseThe drawing.
streamStreamThe stream; it is written to and left open.
versionstringThe version of the file: AC1032 (AutoCAD 2018), AC1027 (2013), AC1024 (2010), AC1021 (2007), AC1018 (2004) or AC1015 (2000).
Exceptions
- ArgumentNullException
Thrown when the drawing or the stream is null.
- NotSupportedException
Thrown when the version is not written; the message names it.
Write(DxfDocument, string, string)
Writes the shapes of a document as a DWG file at a path, replacing whatever is there: the drawing DxfWriter makes of them, each on its layer.
public static void Write(DxfDocument document, string path, string version = "AC1032")
Parameters
documentDxfDocumentThe document.
pathstringThe path of the file.
versionstringThe version of the file: AC1032 (AutoCAD 2018), AC1027 (2013), AC1024 (2010), AC1021 (2007), AC1018 (2004) or AC1015 (2000).
Exceptions
- ArgumentNullException
Thrown when the document or the path is null.
- NotSupportedException
Thrown when the version is not written; the message names it.
- IOException
Thrown when the file cannot be written.
Write(DxfDocument, Stream, string)
Writes the shapes of a document as a DWG file to a stream, where it stands.
public static void Write(DxfDocument document, Stream stream, string version = "AC1032")
Parameters
documentDxfDocumentThe document.
streamStreamThe stream; it is written to and left open.
versionstringThe version of the file: AC1032 (AutoCAD 2018), AC1027 (2013), AC1024 (2010), AC1021 (2007), AC1018 (2004) or AC1015 (2000).
Exceptions
- ArgumentNullException
Thrown when the document or the stream is null.
- NotSupportedException
Thrown when the version is not written; the message names it.