I'm trying to use the arhcestrA provided "trendclient" object. I've successfully got it to read data from my historian and can modify the display time frame using the
function. But for some crazy reason archestrA never considered that we'd want to be able to scroll through the historized values. Go figure.
To fix this I've added a datetimepicker object to my trend page. Users select the start date (in the datetime Picker animation options I've set format to "Custom" and then used the following format MM/dd/yyyy hh:mm:ss tt).
After selecting the date/time they hit a submit button which sets a boolean, DateSubmit, to true.
I then have a function that executes OnTrue for DateSubmit with the following code.
Everything works except for the SetStartAndEndTimes, it errors out with the message
has anyone successfully done this before and can tell me why it's not accepting the date from the datetimePicker?
Code:
TrendClient.TimeSelector.TimeDuration = (integer value)
function. But for some crazy reason archestrA never considered that we'd want to be able to scroll through the historized values. Go figure.
To fix this I've added a datetimepicker object to my trend page. Users select the start date (in the datetime Picker animation options I've set format to "Custom" and then used the following format MM/dd/yyyy hh:mm:ss tt).
After selecting the date/time they hit a submit button which sets a boolean, DateSubmit, to true.
I then have a function that executes OnTrue for DateSubmit with the following code.
Code:
im SDate as time;
dim EDate as time;
dim durType as integer;
TrendClient1.TimeSelector.GetStartAndEndTimes(SDate, EDate);
durType = TrendClient1.TimeSelector.TimeDuration;
TrendClient1.TimeSelector.SetStartAndEndTimes(DateTimePicker1.Value,"",durType);
DateSubmit = false;
Everything works except for the SetStartAndEndTimes, it errors out with the message
Code:
Error setting start and end Times: System.ArgumentOutOfRangeException: Value of '12/31/1600 06:00:00 PM' is not valid for 'Value'. 'Value' should be between 'MinDate' and 'MaxDate'.
Parameter name: Value
at System.Windows.Forms.DateTimePicker.set_Value(DateTime value)
at ArchestrA.HistClient.UI.aaTimeRangePicker.SetStartAndEndTimes(DateTime startTime, DateTime endTime, aaTimeRangeEnumeration duration)
at ArchestrA.HistClient.UI.aaTimeRangePicker.SetStartAndEndTimes(DateTime startTime, DateTime endTime, Int32 duration)
has anyone successfully done this before and can tell me why it's not accepting the date from the datetimePicker?