01-06-2023 06:49 AM
Hi, I have 28 tests (28 data groups and 28 curves) that I would like to be able to plot by a For Loop-script.
I thought that I could replace [1] with the variable [i] and make a loop like the proposal below but it does not work.
Dim i
For i = 1 to 28
Report.ActiveSheet.Objects.Item("2DAxis1").Curves2D.Item(i).Shape.XChannel.Reference = "[i]/Time"
Report.ActiveSheet.Objects.Item("2DAxis1").Curves2D.Item(i).Shape.YChannel.Reference = "[i]/Acceleration"
Next
Does anyone have a solution for this?
/Mike
Solved! Go to Solution.
01-06-2023 07:08 AM
Hi Mike_77,
Please try this:
Dim i
For i = 1 to 28
Report.ActiveSheet.Objects.Item("2DAxis1").Curves2D.Item(i).Shape.XChannel.Reference = "[" & str(i) & "]/Time"
Report.ActiveSheet.Objects.Item("2DAxis1").Curves2D.Item(i).Shape.YChannel.Reference = "[" & str(i) & "]/Acceleration"
Next
Greetings
Walter
01-06-2023 03:11 PM
Thank you, it worked!