主要用到函数说明:
_DMxDrawX::ReadBinStream
从二制流数据中加载图形,详细说明如下:
VARIANT varBinArray | 二制流数据,是个byte数组 |
BSTR sPassword | 图纸密码.没有密码,传空字符串 |
LONG lReadContent | 加载内容,如果全部加载,传16777215,十六进制0xFFFFFF |
VB代码实现如下:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | Dim aryData As Variant MxDrawX1.WriteBinStream aryData, "" , 23 Dim ln As Long ln = UBound(aryData) ReDim sbyte(0 To ln) As Byte Dim str$ For i = 0 To ln sbyte(i) = aryData(i) 'str = str & " " & (aryData(i)) Next ' MsgBox str 'MxDrawX1.ReadBinStream aryData, "" , 16777215 MxDrawX1.ReadBinStream sbyte, "" , 16777215 |