I have an OnChangeTemperature property change script on a temperature sensor for my equipment room.
In it I want to do the following:
Of course there's no Dim in VBScript so this won't work. How do I delcare my variable so that I can have it hold a Temperature value?
(Yes I know I could manually convert Kelvin to Farenheit. That's how I had coded it 8 years ago. But was ugly and bugging me and now I really want to understand how to do this).
In it I want to do the following:
Code:
Dim t As Sys.Schema.Units.Temperature
t.Kelvin = sysevent.newVal
if t.Farenheit >= 90 and t.Farenheit < 200 then
...
Of course there's no Dim in VBScript so this won't work. How do I delcare my variable so that I can have it hold a Temperature value?
(Yes I know I could manually convert Kelvin to Farenheit. That's how I had coded it 8 years ago. But was ugly and bugging me and now I really want to understand how to do this).