10-21-2015 08:47 AM
Hi All,
I am writing a script to plot some graphs and I would to change the type of some of them to "Step Curve". How can I do that? Here is my script;
Option Explicit 'Forces the explicit declaration of all the variables in a script.
Dim oMySheet, oNewArea, Channel, Channels
Call View.Sheets.RemoveAll
Set oMySheet = View.Sheets.Add("Graphs Boilers 1-5")
Set oNewArea = oMySheet.ActiveArea
oNewArea.DisplayObjType ("CurveChart2D")
Set Channels = Data.GetChannels("[1]/*ALL*")
FOR Each Channel In Channels
Call oNewArea.DisplayObj.Curves.Add("[1]/Time", Channel.GetReference(eRefTypeIndexName))
' Looking for Boiler 1
NEXT
Dim Boiler1Term1, Boiler1Term1s
Set Boiler1Term1s = Data.GetChannels("[1]/*Boiler 1 M2G Terminal*")
FOR Each Boiler1Term1 In Boiler1Term1s
Call oNewArea.DisplayObj.Curves.Add("[1]/Time", Boiler1Term1.GetReference(eRefTypeIndexName))
Dim Boiler1GV, Boiler1GVs
Set Boiler1GVs = Data.GetChannels("[1]/*Boiler 1 Gas*")
FOR Each Boiler1GV In Boiler1GVs
Call oNewArea.DisplayObj.Curves.Add("[1]/Time", Boiler1GV.GetReference(eRefTypeIndexName))
NEXT
View.Sheets("Graphs Boilers 1-5").Areas("Area : 1").DisplayObj.YScaling = "n systems [phys.]"
Call WndShow("VIEW","Open")
Next
Many thanks
Estefania
Solved! Go to Solution.
10-23-2015 08:18 AM
Hi there,
There is an object property that specifies the type of curve presented on a 2D Axis graph. You can read about it in the article below;
So should just be.. oNewArea.Type = "Step Curve"
Hope this helps, let me know if you have any questions.
Thanks,
Josh
10-27-2015 04:26 AM
Thanks Josh, it works
Regards