| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 461 人关注过本帖
标题:请高手帮我看看这段代码
取消只看楼主 加入收藏
yilinlangzi
Rank: 1
等 级:新手上路
帖 子:15
专家分:0
注 册:2013-6-24
结帖率:100%
收藏
 问题点数:0 回复次数:0 
请高手帮我看看这段代码
Sub add

'以下是显示名叫“surge”一条由6个点连成的曲线
Dim x(6) As Variant

Dim y(6) As Variant

Dim z1 As Variant

z1 = PointGet("GMRC.R02701[15]")

Dim z2 As Variant

z2 = PointGet("GMRC.R02701[16]")

Dim z3 As Variant

z3 = PointGet("GMRC.R02701[17]")

Dim z4 As Variant

z4 = PointGet("GMRC.R02701[18]")

Dim z5 As Variant

z5 = PointGet("GMRC.R02701[19]")

Dim z6 As Variant

z6 = PointGet("GMRC.R02701[20]")

Dim z7 As Variant

z7 = PointGet("GMRC.R02701[21]")

Dim z8 As Variant

z8 = PointGet("GMRC.R02701[22]")

Dim z9 As Variant

z9 = PointGet("GMRC.R02701[23]")

Dim z10 As Variant

z10 = PointGet("GMRC.R02701[24]")

x(0) = 0

x(1) = z6

x(2) = z7
                                         
x(3) = z8

x(4) = z9

x(5) = z10

x(6) = 40000

y(0) = 0

y(1) = z1

y(2) = z2

y(3) = z3

y(4) = z4

y(5) = z5

y(6) = z5

cimOleObj.Series("surge").Data.Set 6, x, y



'以下是显示名叫“POINT”一个点
Dim xLT As Variant

Dim yPT As Variant

xLT = PointGet("GMRC.FT5101")

yPT = PointGet("GMRC.PDT5101")

cimOleObj.Series("POINT").Data.Push xLT, yPT


'以下是显示名叫“FAST”一条由6个点连成的曲线
Dim x5(6) As Variant

Dim y5(6) As Variant

Dim z51 As Variant

z51 = PointGet("GMRC.R02701[15]")    *0.97

Dim z52 As Variant

z52 = PointGet("GMRC.R02701[16]")    *0.97

Dim z53 As Variant

z53 = PointGet("GMRC.R02701[17]")    *0.97

Dim z54 As Variant

z54 = PointGet("GMRC.R02701[18]")    *0.97

Dim z55 As Variant

z55 = PointGet("GMRC.R02701[19]")    *0.97

Dim z56 As Variant

z56 = PointGet("GMRC.R02701[20]")    *1.03

Dim z57 As Variant

z57 = PointGet("GMRC.R02701[21]")    *1.03

Dim z58 As Variant

z58 = PointGet("GMRC.R02701[22]")    *1.03

Dim z59 As Variant

z59 = PointGet("GMRC.R02701[23]")    *1.03

Dim z510 As Variant

z510 = PointGet("GMRC.R02701[24]")  *1.03

                                    
x5(0) = 0

x5(1) = z56

x5(2) = z57
                                         
x5(3) = z58

x5(4) = z59

x5(5) = z510

x5(6) = 40000

y5(0) = 0

y5(1) = z51

y5(2) = z52

y5(3) = z53

y5(4) = z54

y5(5) = z55

y5(6) = z55


cimOleObj.Series("FAST").Data.Set 6, x5, y5


'以下是显示名叫“OPEN”一条由6个点连成的曲线
Dim x1(6) As Variant

Dim y1(6) As Variant

Dim z11 As Variant

z11 = PointGet("GMRC.R02701[45]")

Dim z12 As Variant

z12 = PointGet("GMRC.R02701[46]")

Dim z13 As Variant

z13 = PointGet("GMRC.R02701[47]")   

Dim z14 As Variant

z14 = PointGet("GMRC.R02701[48]")

Dim z15 As Variant

z15 = PointGet("GMRC.R02701[49]")   

Dim z16 As Variant

z16 = PointGet("GMRC.R02701[50]")

Dim z17 As Variant

z17 = PointGet("GMRC.R02701[51]")

Dim z18 As Variant

z18 = PointGet("GMRC.R02701[52]")

Dim z19 As Variant

z19 = PointGet("GMRC.R02701[53]")

Dim z110 As Variant

z110 = PointGet("GMRC.R02701[54]")

                                    

x1(0) = 0

x1(1) = z16

x1(2) = z17
                                         
x1(3) = z18

x1(4) = z19

x1(5) = z110

x1(6) = 40000

y1(0) = 0

y1(1) = z11

y1(2) = z12

y1(3) = z13

y1(4) = z14

y1(5) = z15

y1(6) = z15


cimOleObj.Series("OPEN").Data.Set 6, x1, y1
Dim surnum As Integer
surnum = PointGet("SG.NUM")
If surnum > 0 Then
cimOleObj.Series("OPEN").Pen.color = cimOleObj.RGB(128,0,128)
cimOleObj.Series("OPEN").brush.color = cimOleObj.RGB(128,0,128)
Else
cimOleObj.Series("OPEN").Pen.color = cimOleObj.RGB(0,255,0)
cimOleObj.Series("OPEN").brush.color = cimOleObj.RGB(0,255,0)

End If

'以下是显示名叫“xinzeng”一条由6个点连成的曲线
Dim A(6) As Variant

Dim B(6) As Variant


A(0) = 0

A(1) = 5000

A(2) = 15000
                                         
A(3) = 20000

A(4) = 25000

A(5) = 30000

A(6) = 40000

B(0) = 0

B(1) = 5

B(2) = 10

B(3) = 15

B(4) = 20

B(5) = 25

B(6) = 25

cimOleObj.Series("xinzeng").Data.Set 6, A, B


End Sub

这是在一坐标轴显示曲线的代码(部分)
上面的“surge”“FAST”“OPEN”曲线和点“point”在运行时能显示,
我的“xinzneg"曲线直接输入的数值应该能直接显示不需要地址转换的,但就是显示不出来
各位帮看看就这段代码有错误没?
2013-07-08 14:26
快速回复:请高手帮我看看这段代码
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.037858 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved