07-06-2016 12:02 PM
Hi,
I have multiple .csv files that I import into the data portal, I want to be able to write a script that looks for specific channels and puts them into view for comparisons. I want to know how would I assign channels a variable that would sort through whatever file I import and pull those specific channels for comparison.
Thank you.
07-07-2016 03:54 PM
If I understand what you're trying to do, your best bet is to plot all the plots you'd like, and save that view layout. You'll want to setup your settings to be namebased not group based. This way it will call channels and groups by name not by number. So as long as your CSVs are all named the same, it doesn't matter what order they load into your Data Portal.
07-08-2016 05:58 AM
call View.Sheets.RemoveAll
Set Vsheet = view.Sheets.Add("U_FREXG")
Set NewArea= Vsheet.ActiveArea
NewArea.DisplayObjType = "CurveChart2D"
Call NewArea.DisplayObj.Curves2D.Add("[1]/Time","[1]/U_FREXG")
How do I make it so that Time is constant against a variable [i]/U_FREXG or anyother channel I am looking for? I want to make it automated, so its just plug and play.
Thank you.
07-08-2016 01:07 PM
Well you need some type of a loop. Are you trying to plot every channel against time? If you can show your file structure it would help.
07-08-2016 01:37 PM
Yes, we get csv files that we pull into the data portal and we have to compare several channels in View just as a quick quality check.They must all be plotted against time.
07-11-2016 07:57 AM
Call Area.DisplayObj.Curves2D.Add("[1]/Time","[1]/U_FREXG")
Call Area2.DisplayObj.Curves2D.Add("[1]/Time","[1]/TEO.1")
Call Area.DisplayObj.Curves2D.Add("[1]/Time","[2]/U_FREXG")
Call Area2.DisplayObj.Curves2D.Add("[1]/Time","[2]/TEO.1")
Call Area.DisplayObj.Curves2D.Add("[1]/Time","[3]/U_FREXG")
Call Area2.DisplayObj.Curves2D.Add("[1]/Time","[3]/TEO.1")
d of calling all these sheets, is there a way to just call ALL time found in the data against ALL of another certain channel?
07-12-2016 04:38 PM
Hey,
If you want to do this for every group in your Data Portal, you could do this:
for each group in Data.Root.ChannelGroups
Call Area.DisplayObj.Curves2D.Add("[1]"Time",group.Channles("UREXG"))
Call Area2.DisplayObj.Curves2D.Add("[1]"Time",group.Channles("TEO.1"))
Next
if you just wanted to do this for the first three groups, you could do:
For i = 1 To 3
Call Area.DisplayObj.Curves2D.Add("[1]/Time","["&i&"]/U_FREXG")
Call Area2.DisplayObj.Curves2D.Add("[1]/Time","["&i&"]/TEO.1")
Next
07-13-2016 08:43 AM
The second option worked, the first one gave me this error:
07-13-2016 08:52 AM
Also, thank you.
07-21-2016 05:42 AM
How can I make it so that I dont have to adjust the number of files I will cycle through?
for i to uberbound does not work.