Click or drag to resize

DxfDocumentLoad Method (Stream)

Loads a dxf file.

Namespace:  DXFReaderNET
Assembly:  DXFReaderNET (in DXFReaderNET.dll) Version: 20.10.54
Syntax
public DxfDocument Load(
	Stream stream
)

Parameters

stream
Type: System.IOStream
Stream.

Return Value

Type: DxfDocument
Returns a DxfDocument. It will return null if the file has not been able to load.
Remarks
The caller will be responsible of closing the stream.
Examples
The following code will show how to display a DXF file containend in a string:
[C#]

string dxfString = File.ReadAllText("myFile.dxf");
byte[] byteArray = System.Text.Encoding.ASCII.GetBytes(dxfString);
MemoryStream stream = new MemoryStream(byteArray);
dxfReaderNETControl1.DXF = dxfReaderNETControl1.DXF.Load(stream);
dxfReaderNETControl1.Refresh();
[Visual Basic]

Dim dxfString As String = File.ReadAllText("myFile.dxf")
Dim byteArray As Byte() = System.Text.Encoding.ASCII.GetBytes(dxfString)
Dim myStream As MemoryStream = New MemoryStream(byteArray)
dxfReaderNETControl1.DXF = dxfReaderNETControl1.DXF.Load(myStream)
See Also