GetPenDataArray 方法示例

以下示例在一个文件中生成包含标准图表Chart1内所有数据的报告。

Dim lNumPts As Long

Dim vVal As Variant

Dim vPsa As Variant

Dim vQual As Variant

Dim vMill As Variant

Dim toto As Object

Dim Mypath As String

Dim myfile As String

Dim RTN As String


RTN = ""


If Chart1.Pens.Count <> 0 Then

Mypath = System.BasePath

myfile = Mypath & "\app\ChartReport.txt"

RTN = Dir(myfile)

If RTN <> "" Then

'文件不存在

'删除输出文件

Kill myfile

End If

Open myfile For Output As #1

For i = 1 To Chart1.Pens.Count

Chart1.Pens.Item(i).GetPenDataArrayEx lNumPts, vVal, vPsa, vQual, vMill

For j = 0 To (lNumPts - 1)

Value = vVal(j)

Time = vPsa(j)

Quality = vQual(j)

Mill = vMill(j)

Write #1, Chart1.Pens.Item(i).Source;" "; Time;" "; Value; ""

Next j

Next i

Close #1

End If

 

您最近了解过 iFIX 吗 ?

查看最新版 iFIX 的所有新功能。

让 iFIX 帮助您提高效率,降低成本。