TeeChart for ActiveX, COM and ASP
-
mkaker
- Newbie
- Posts: 4
- Joined: Tue Jan 13, 2009 12:00 am
Post
by mkaker » Mon Mar 15, 2010 11:24 am
I have an Problem with the following code:
Code: Select all
For T = 0 To .SeriesCount - 1
Next T
.AddSeries (scVector3D)
Do While Not rstTable_2.EOF
.Series(T).AddVector 0, 0, 0, rstTable_2.Fields("X1"), rstTable_2.Fields("Y1"), rstTable_2.Fields("Z1"), "", clTeeColor
rstTable_2.MoveNext
Loop
rstTable.Close
the execution stops with the message that the object does not support the property or method!
Does anybody know about it? What is wrong in my code?
-
Yeray
- Site Admin
- Posts: 9614
- Joined: Tue Dec 05, 2006 12:00 am
- Location: Girona, Catalonia
-
Contact:
Post
by Yeray » Mon Mar 15, 2010 3:35 pm
Hi mkaker,
I think you have posted an incorrect code (the for ends before doing anything and you are using tables we don't have here). Anyway, I think that you are getting an "object doesn't support this property or method" error because you missed an "asVector3D" call to access to AddVector method that is specific to the scVector3D series. The following code works fine for me here:
Code: Select all
Dim T, C As Integer
C = 0
With TChart1
For T = 0 To 5
.AddSeries (scVector3D)
Do While Not C = 10
.Series(T).asVector3D.AddVector 0, 0, 0, Rnd * 100, Rnd * 100, Rnd * 100, "", clTeeColor
C = C + 1
Loop
Next T
End With