如何从二制流数据中加载图形?
VB开发|黄洪辉|2018-06-14 10:20
-
回答:
主要用到函数说明:
_DMxDrawX::ReadBinStream
从二制流数据中加载图形,详细说明如下:
参数 说明 VARIANT varBinArray
二制流数据,是个byte数组
BSTR sPassword
图纸密码.没有密码,传空字符串
LONG lReadContent
加载内容,如果全部加载,传16777215,十六进制0xFFFFFF
VB代码实现如下:
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