No announcement yet.

C# Script Error: DeviceType_Get Not Known

  • Filter
  • Time
  • Show
Clear All
new posts

    C# Script Error: DeviceType_Get Not Known

    I have a C# that has the following code:

        HomeSeerAPI.DeviceTypeInfo_m.DeviceTypeInfo DT;
        Scheduler.Classes.DeviceClass dv;
        dv = (Scheduler.Classes.DeviceClass)hs.GetDeviceByRef(1234);
        DT = dv.DeviceType_Get(hs);
    This gives me the error below. It's a public function so I am not sure why I can't access it. Also it says it's not supported in C#. Why would it matter if I use C# or It's all just IL.

    Compiling script C:\Program Files (x86)\HomeSeer HS3\scripts\Security.cs: {interactive}(41,13): error CS0122: `Scheduler.Classes.DeviceClass.DeviceType_Get' is inaccessible due to its protection level {interactive}(41,13): error CS1546: Property or event `Scheduler.Classes.DeviceClass.DeviceType_Get' is not supported by the C# language {interactive}(41,13): error CS0154: The property or indexer `Scheduler.Classes.DeviceClass.DeviceType_Get' cannot be used in this context because it lacks the `get' accessor {interactive}(7,17): warning CS0414: The private field `Script.hs' is assigned but its value is never used

    Ok, I finally figured this out. The function listed is DeviceType_Get but when calling from C# you have to use get_DeviceType_Get.