The main use of Function:
_DMxDrawX::ReadBinStream
Loading the graphic data from the two-stream system, described in detail below:
parameter | Explanation |
---|---|
VARIANT varBinArray |
Two system stream data, is a byte array |
BSTR sPassword |
Drawing password no password, pass an empty string |
LONG lReadContent |
Loading content, if fully loaded, pass 16777215, hexadecimal 0xFFFFFF |
c # code to achieve the following:
1
2
3
4
5
6
7
8
9
|
string sFileName =
"G:\12345.dwg"
;
//axMxDrawX1.SaveDwgFile(sFileName);
FileStream fileStream =
new
FileStream(sFileName, FileMode.Open, FileAccess.Read);
BinaryReader binaryReader =
new
BinaryReader(fileStream);
byte[] mybyte = binaryReader.ReadBytes((int)fileStream.Length);
axMxDrawX1.NewFile();
axMxDrawX1.ReadBinStream(mybyte,
""
, 16777215);
|