Page 1 of 1

AddVector

Posted: Mon Mar 15, 2010 11:24 am
by 15351460
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?

Re: AddVector

Posted: Mon Mar 15, 2010 3:35 pm
by yeray
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