Sorry for the false accusation towards tenscripting (which was very useful to debug the script). Did the final tests late last night, must have been partially blind somehow. Missed the first line in my code, I guess I must have copied it from somewhere, but no idea where it came from.
Kristof.
Announcement
Collapse
No announcement yet.
Namespace or type specified in the Imports 'System.Core' error
Collapse
X
-
Originally posted by backkri View PostYou are right. I did not include that line myself, the tenScripting3 software did, and I missed it when using the script in the event.
Now it works.
tenholde
Leave a comment:
-
You are right. I did not include that line myself, the tenScripting3 software did, and I missed it when using the script in the event.
Now it works.
Leave a comment:
-
Namespace or type specified in the Imports 'System.Core' error
Dear all,
I having taken my first steps in scripting, but experience a problem which i cannot seem to solve. When I run the script in 'tenScripting3', it runs and does what it has to do. But when included in an event, I get:
Compiling script C:\Program Files (x86)\HomeSeer HS3\scripts\ArduinoGas.vb: Namespace or type specified in the Imports 'System.Core' doesn't contain any public member or cannot be found. Make sure the namespace or the type is defined and contains at least one public member. Make sure the imported element name doesn't use any aliases.
Script:
Imports Microsoft.VisualBasic
Public Sub Main(ByVal Parms As Object)
Dim prvValue As Double '' Previous value saved at midnight
Dim actValue As Double '' Actual value
Dim dayValue As Double '' Day value
'' Read previous value stored at midnight
prvValue = hs.DeviceValueEx(928)
'' Read actual value
actValue = hs.DeviceValueEx(731)
'' Calculate day consumption
dayValue = actValue - prvValue
hs.SetDeviceValueByRef(929, dayValue, True)
End Sub
Tags: None
Leave a comment: