以下示例在消息框中显示增强图表的 x、y 和数据质量的当前值,这些值使用 GetCurrentValueWithQuality 方法返回。
Private Sub CommandButton11_Click()
Dim objDataSet As Object ' FixRealTimeDataSet.FixRealTimeDataSet
Dim varXValue As Variant, dblYValue As Double, lngQuality As Long
Set objDataSet = LineChart1.GetCurrentDataSet()
objDataSet.GetCurrentValueWithQuality varXValue, dblYValue, lngQuality
MsgBox "AssignedID 为 " & CStr(objDataSet.AssignedID) & vbCrLf & _
"ResolvedSourceName 为 " & CStr(objDataSet.ResolvedSourceName) & vbCrLf & _
"当前 X 值为 " & CStr(varXValue) & vbCrLf & _
"当前 Y 值为 " & CStr(dblYValue) & vbCrLf & _
"当前质量为 " & CStr(lngQuality)
End Sub