﻿?VB DeviceValue
Dim d As Double
d = hs.DeviceValueEx(@d)

?CS DeviceValue
Double d;
d = hs.DeviceValueEx(@d);

?VB DeviceValueValue
Dim i As Integer
i = hs.DeviceValue(@d)

?CS DeviceValueValue
int i;
i = hs.DeviceValue(@d);

?VB 4DeviceValue
Dim d As Double
d = hs4.GetPropertyByRef(@d,HomeSeer.PluginSdk.Devices.EProperty.Value)   'requires HS reference to PluginSDK

?CS 4DeviceValue
Double d;
d = (Double)hs4.GetPropertyByRef(@d, HomeSeer.PluginSdk.Devices.EProperty.Value);   //requires HS reference to PluginSDK

?VB 3Address
Dim s As String
s = CType(@h.GetDeviceByRef(@d), Scheduler.Classes.DeviceClass).Address(@h)

?CS 3Address
string s;
s = ((Scheduler.Classes.DeviceClass)@h.GetDeviceByRef(@d)).get_Address(@h);

?VB Address
Dim s As String
s = CType(hs.GetDeviceByRef(@d), Scheduler.Classes.DeviceClass).Address(hs)

?CS Address
string s;
s = ((Scheduler.Classes.DeviceClass)hs.GetDeviceByRef(@d)).get_Address(hs);

?VB Code
Dim s As String
s = CType(hs.GetDeviceByRef(@d), Scheduler.Classes.DeviceClass).Code(hs)

?CS Code
string s;
s = ((Scheduler.Classes.DeviceClass)hs.GetDeviceByRef(@d)).get_Code(hs);

?VB Location2
Dim s As String
s = CType(hs.GetDeviceByRef(@d), Scheduler.Classes.DeviceClass).Location2(hs)

?CS Location2
string s;
s = ((Scheduler.Classes.DeviceClass)hs.GetDeviceByRef(@d)).get_Location2(hs);

?VB Location
Dim s As String
s = CType(hs.GetDeviceByRef(@d), Scheduler.Classes.DeviceClass).Location(hs)

?CS Location
string s;
s = ((Scheduler.Classes.DeviceClass)hs.GetDeviceByRef(@d)).get_Location(hs);

?VB Name
Dim s As String
s = CType(hs.GetDeviceByRef(@d), Scheduler.Classes.DeviceClass).Name(hs)

?CS Name
string s;
s = ((Scheduler.Classes.DeviceClass)hs.GetDeviceByRef(@d)).get_Name(hs);

?VB Interface
Dim s As String
s = CType(hs.GetDeviceByRef(@d), Scheduler.Classes.DeviceClass).Interface(hs)

?CS Interface
string s;
s = ((Scheduler.Classes.DeviceClass)hs.GetDeviceByRef(@d)).get_Interface(hs);

?VB DeviceTime
Dim i As Integer
i = hs.DeviceTime(@d)

?CS DeviceTime
int i;
i = hs.DeviceTime(@d);

?VB DeviceDateTime
Dim d As Date
d = hs.DeviceDateTime(@d)

?CS DeviceDateTime
DateTime d;
d = hs.DeviceDateTime(@d);

?VB DeviceLastChange
Dim d As Date
d = hs.DeviceLastChange(@d)

?CS DeviceLastChange
DateTime d;
d = hs.DeviceLastChange(@d);

?VB DeviceLastChangeRef
Dim d As Date
d = hs.DeviceLastChangeRef(@d)

?CS DeviceLastChangeRef
DateTime d;
d = hs.DeviceLastChangeRef(@d);

?VB Location2Alias
dim s as string
s = hs.GetINISetting("Settings", "gLocLabel2", "")

?CS Location2Alias
string s;
s = hs.GetINISetting("Settings", "gLocLabel2", "");

?VB LocationAlias
dim s as string
s = hs.GetINISetting("Settings", "gLocLabel", "")

?CS LocationAlias
string s;
s = hs.GetINISetting("Settings", "gLocLabel", "");

?VB CapiControlUse
 Dim cc As HomeSeerAPI.CAPI.CAPIControl
 Dim cr As HomeSeerAPI.CAPIControlResponse
 cc = hs.CAPIGetSingleControlByUse(@d, HomeSeerAPI.ePairControlUse.@2)
 @1
 cr = hs.CAPIControlHandler(cc)

?CS CapiControlUse
HomeSeerAPI.CAPI.CAPIControl cc;
HomeSeerAPI.CAPI.CAPIControlResponse cr;
cc = hs.CAPIGetSingleControlByUse(@d, HomeSeerAPI.ePairControlUse.@2);
@1
cr = hs.CAPIControlHandler(cc);

?VB CapiControls
Dim cc As HomeSeerAPI.CAPI.CAPIControl
Dim cr As HomeSeerAPI.CAPI.CAPIControlResponse
cc = hs.CAPIGetSingleControl(@d, True, "@1", False, False)
@2
cr = hs.CAPIControlHandler(cc)

?CS CapiControls
HomeSeerAPI.CAPI.CAPIControl cc;
HomeSeerAPI.CAPI.CAPIControlResponse cr;
cc = hs.CAPIGetSingleControl(@d, true, "@1", false, false);
@2;
cr = hs.CAPIControlHandler(cc);

?VB DeviceStatus
Dim s As String
s = hs.DeviceVSP_GetStatus(@d, hs.DeviceValue(@d), HomeSeerAPI.ePairStatusControl.Status)

?CS DeviceStatus
String s;
s = hs.DeviceVSP_GetStatus(@d, hs.DeviceValue(@d), HomeSeerAPI.ePairStatusControl.Status);

?VB ValueGraphic
Dim s As String
s = hs.DeviceVGP_GetGraphic(@d, hs.DeviceValueEx(@d))

?CS ValueGraphic
String s;
s = hs.DeviceVGP_GetGraphic(@d, hs.DeviceValueEx(@d));

?VB DeviceString
Dim s As String
s = hs.DeviceString(@d)

?CS DeviceString
String s;
s = hs.DeviceString(@d);

?VB MiscProperties
Dim b As Boolean
b = CType(hs.GetDeviceByRef(@d), Scheduler.Classes.DeviceClass).MISC_Check(hs, HomeSeerAPI.Enums.@1)
If b Then
  hs.WriteLog("tenScriptAid4", HomeSeerAPI.Enums.@1.ToString & " is SET")
Else
  hs.WriteLog("tenScriptAid4", HomeSeerAPI.Enums.@1.ToString & " is NOT set")
End If

?CS MiscProperties
Boolean b;
Scheduler.Classes.DeviceClass d;
d = (Scheduler.Classes.DeviceClass)hs.GetDeviceByRef(@d);
b = d.MISC_Check(hs, HomeSeerAPI.Enums.dvMISC.@1);
if (b)
{ 
  hs.WriteLog("tenScriptAid4", HomeSeerAPI.Enums.dvMISC.@1.ToString() + " is SET");
} 
else
{ 
  hs.WriteLog("tenScriptAid4", HomeSeerAPI.Enums.dvMISC.@1.ToString() + " is NOT set");
} 

?VB MiscProperties2
Dim b As Boolean
b = CType(hs.GetDeviceByRef(@d), Scheduler.Classes.DeviceClass).@1(hs)
If b Then
  hs.WriteLog("tenScriptAid4", "@1" & " is SET")
Else
  hs.WriteLog("tenScriptAid4", "@1" & " is NOT set")
End If

?CS MiscProperties2
Boolean b;
Scheduler.Classes.DeviceClass d;
d = (Scheduler.Classes.DeviceClass)hs.GetDeviceByRef(@d);
b = d.get_@1(hs);
if (b)
{ 
  hs.WriteLog("tenScriptAid4", "@1" + " is SET");
} 
else
{ 
  hs.WriteLog("tenScriptAid4", "@1" + " is NOT set");
} 

?VB DeviceName
@1

?CS DeviceName
@1

?VB AllCategories
Dim Cats As System.Collections.Generic.Dictionary(Of String, String)   ' Cats(CatId,CatName)
Cats=hs4.GetAllCategories()

?CS AllCategories
System.Collections.Generic.Dictionary<string, string> Cats;   // Cats(CatId,CatName)
Cats = hs4.GetAllCategories();

?VB Relationship
Dim DevObj As Scheduler.Classes.DeviceClass = CType(hs.GetDeviceByRef(@d), Scheduler.Classes.DeviceClass)
Dim i1 As Integer = DevObj.Relationship(hs)            'Integer Value
Dim s1 As String = DevObj.Relationship(hs).ToString    'HomeSeerAPI.Enums.eRelationship

?CS Relationship
Scheduler.Classes.DeviceClass DevObj = (Scheduler.Classes.DeviceClass)hs.GetDeviceByRef(@d);
Int32 i1 = (Int32)DevObj.get_Relationship(hs);            //Integer Value
String s1 = DevObj.get_Relationship(hs).ToString();       //HomeSeerAPI.Enums.eRelationship

?VB Ref
Imports tenGlobalMethods
Dim dr as Integer
dr = GetFeatureRefByFullname(hs,"@1","@2")      'HS4 Scripting Extensions Must be Installed

?CS Ref
using tenGlobalMethods;
Int32 dr;
dr = ten.GetFeatureRefByFullname(hs,"@1","@2");          //HS4 Scripting Extensions Must be Installed

?VB DeviceTypeAPI
Dim DevTypeInfo As HomeSeerAPI.DeviceTypeInfo
Dim DevObj As Scheduler.Classes.DeviceClass
Dim s As String
DevObj = CType(hs.GetDeviceByRef(@d), Scheduler.Classes.DeviceClass)
DevTypeInfo = DevObj.DeviceType_Get(hs)
s = DevTypeInfo.Device_API_Description

?CS DeviceTypeAPI
HomeSeerAPI.DeviceTypeInfo_m.DeviceTypeInfo DevTypeInfo;
Scheduler.Classes.DeviceClass DevObj;
String s;
DevObj = (Scheduler.Classes.DeviceClass)hs.GetDeviceByRef(@d);
DevTypeInfo = DevObj.get_DeviceType_Get(hs);
s = DevTypeInfo.Device_API_Description;

?VB DeviceTypeType
Dim DevTypeInfo As HomeSeerAPI.DeviceTypeInfo
Dim DevObj As Scheduler.Classes.DeviceClass
Dim s As String
DevObj = CType(hs.GetDeviceByRef(@d), Scheduler.Classes.DeviceClass)
DevTypeInfo = DevObj.DeviceType_Get(hs)
s = DevTypeInfo.Device_Type_Description

?CS DeviceTypeType
HomeSeerAPI.DeviceTypeInfo_m.DeviceTypeInfo DevTypeInfo;
Scheduler.Classes.DeviceClass DevObj;
String s;
DevObj = (Scheduler.Classes.DeviceClass)hs.GetDeviceByRef(@d);
DevTypeInfo = DevObj.get_DeviceType_Get(hs);
s = DevTypeInfo.Device_Type_Description;

?VB DeviceTypeSubType
Dim DevTypeInfo As HomeSeerAPI.DeviceTypeInfo
Dim DevObj As Scheduler.Classes.DeviceClass
Dim s As String
DevObj = CType(hs.GetDeviceByRef(@d), Scheduler.Classes.DeviceClass)
DevTypeInfo = DevObj.DeviceType_Get(hs)
s = DevTypeInfo.Device_SubType_Description

?CS DeviceTypeSubType
HomeSeerAPI.DeviceTypeInfo_m.DeviceTypeInfo DevTypeInfo;
Scheduler.Classes.DeviceClass DevObj;
String s;
DevObj = (Scheduler.Classes.DeviceClass)hs.GetDeviceByRef(@d);
DevTypeInfo = DevObj.get_DeviceType_Get(hs);
s = DevTypeInfo.Device_SubType_Description;

?VB Type
Dim DevObj As Scheduler.Classes.DeviceClass
Dim s As String
DevObj = CType(hs.GetDeviceByRef(@d), Scheduler.Classes.DeviceClass)
s = DevObj.Device_Type_String(hs)

?CS Type
Scheduler.Classes.DeviceClass DevObj;
String s;
DevObj = (Scheduler.Classes.DeviceClass)hs.GetDeviceByRef(@d);
s = DevObj.get_Device_Type_String(hs);

?VB CapiValue
Dim CS As HomeSeerAPI.CAPI.CAPIStatus
Dim d As Double
CS = CType(hs.CAPIGetStatus(@d), HomeSeerAPI.CAPI.CAPIStatus)
d = CS.Value

?CS CapiValue
HomeSeerAPI.CAPI.CAPIStatus CS;
Double d;
CS = (HomeSeerAPI.CAPI.CAPIStatus)hs.CAPIGetStatus(@d);
d = CS.Value;

?VB CapiStatus
Dim CS As HomeSeerAPI.CAPI.CAPIStatus
Dim s As String
CS = CType(hs.CAPIGetStatus(@d), HomeSeerAPI.CAPI.CAPIStatus)
s = CS.Status.ToString

?CS CapiStatus
HomeSeerAPI.CAPI.CAPIStatus CS;
String s;
CS = (HomeSeerAPI.CAPI.CAPIStatus)hs.CAPIGetStatus(@d);
s = CS.Status.ToString();

?VB UserNote
Dim dev As Scheduler.Classes.DeviceClass
Dim s As String
dev = CType(hs.GetDeviceByRef(@d), Scheduler.Classes.DeviceClass)
s = dev.UserNote(hs)

?CS UserNote
Scheduler.Classes.DeviceClass dev;
String s;
dev = (Scheduler.Classes.DeviceClass)hs.GetDeviceByRef(@d);
s = dev.get_UserNote(hs);

?VB VoiceCommand
Dim dev As Scheduler.Classes.DeviceClass
Dim s As String
dev = CType(hs.GetDeviceByRef(@d), Scheduler.Classes.DeviceClass)
s = dev.VoiceCommand(hs)

?CS VoiceCommand
Scheduler.Classes.DeviceClass dev;
String s;
dev = (Scheduler.Classes.DeviceClass)hs.GetDeviceByRef(@d);
s = dev.get_VoiceCommand(hs);

?VB UserAccess
Dim dev As Scheduler.Classes.DeviceClass
Dim s As String
dev = CType(hs.GetDeviceByRef(@d), Scheduler.Classes.DeviceClass)
s = dev.UserAccess(hs)

?CS UserAccess
Scheduler.Classes.DeviceClass dev;
String s;
dev = (Scheduler.Classes.DeviceClass)hs.GetDeviceByRef(@d);
s = dev.get_UserAccess(hs);

?VB 4Location2
Dim s as String
s = hs4.GetPropertyByRef(@d,HomeSeer.PluginSdk.Devices.EProperty.Location2).ToString   

?CS 4Location2
String s;
s = hs4.GetPropertyByRef(@d, HomeSeer.PluginSdk.Devices.EProperty.Location2).ToString();   

?VB 4Location2Alias
Dim s As String
s = hs4.GetLocation2Name

?CS 4Location2Alias
String s;
s = hs4.GetLocation2Name();

?VB 4Location
Dim s as String
s = hs4.GetPropertyByRef(@d,HomeSeer.PluginSdk.Devices.EProperty.Location).ToString   

?CS 4Location
String s;
s = hs4.GetPropertyByRef(@d, HomeSeer.PluginSdk.Devices.EProperty.Location).ToString();   

?VB 4LocationAlias
Dim s As String
s = hs4.GetLocation1Name

?CS 4LocationAlias
String s;
s = hs4.GetLocation1Name();

?VB 4Name
Dim s As String
s = hs4.GetPropertyByRef(@d, HomeSeer.PluginSdk.Devices.EProperty.Name).ToString

?CS 4Name
String s;
s = hs4.GetPropertyByRef(@d, HomeSeer.PluginSdk.Devices.EProperty.Name).ToString();

?VB 4Address
Dim s As String
s = hs4.GetPropertyByRef(@d, HomeSeer.PluginSdk.Devices.EProperty.Address).ToString

?CS 4Address
String s;
s = hs4.GetPropertyByRef(@d, HomeSeer.PluginSdk.Devices.EProperty.Address).ToString();

?VB 4Interface
Dim s As String
s = hs4.GetPropertyByRef(@d, HomeSeer.PluginSdk.Devices.EProperty.Interface).ToString

?CS 4Interface
String s;
s = hs4.GetPropertyByRef(@d, HomeSeer.PluginSdk.Devices.EProperty.Interface).ToString();

?VB 4Relationship
Dim s As String
s = hs4.GetPropertyByRef(@d, HomeSeer.PluginSdk.Devices.EProperty.Relationship).ToString

?CS 4Relationship
String s;
s = hs4.GetPropertyByRef(@d, HomeSeer.PluginSdk.Devices.EProperty.Relationship).ToString();

?VB 4Value
Dim d As Double
d = CType(hs4.GetPropertyByRef(@d, HomeSeer.PluginSdk.Devices.EProperty.Value), Double)

?CS 4Value
double d;
d = (double)hs4.GetPropertyByRef(@d, HomeSeer.PluginSdk.Devices.EProperty.Value);

?VB 4DisplayedStatus
Dim s As String
s = hs4.GetPropertyByRef(@d, HomeSeer.PluginSdk.Devices.EProperty.DisplayedStatus).ToString

?CS 4DisplayedStatus
string s;
s = hs4.GetPropertyByRef(@d, HomeSeer.PluginSdk.Devices.EProperty.DisplayedStatus).ToString();

?VB 4Image
Dim s As String
s = hs4.GetPropertyByRef(@d, HomeSeer.PluginSdk.Devices.EProperty.Image).ToString

?CS 4Image
string s;
s = hs4.GetPropertyByRef(@d, HomeSeer.PluginSdk.Devices.EProperty.Image).ToString();

?VB 4LastChange
Dim d As System.DateTime
d = CType(hs4.GetPropertyByRef(@d, HomeSeer.PluginSdk.Devices.EProperty.LastChange), System.DateTime)

?CS 4LastChange
System.DateTime d;
d = (System.DateTime)hs4.GetPropertyByRef(@d, HomeSeer.PluginSdk.Devices.EProperty.LastChange);

?VB 4TypeInfoApiType
Dim ti As HomeSeer.PluginSdk.Devices.Identification.TypeInfo
Dim i As Integer
ti = CType(hs4.GetPropertyByRef(@d, HomeSeer.PluginSdk.Devices.EProperty.DeviceType), HomeSeer.PluginSdk.Devices.Identification.TypeInfo)
i = CInt(ti.ApiType)

?CS 4TypeInfoApiType
HomeSeer.PluginSdk.Devices.Identification.TypeInfo ti;
Int32 i;
ti = (HomeSeer.PluginSdk.Devices.Identification.TypeInfo)hs4.GetPropertyByRef(@d, HomeSeer.PluginSdk.Devices.EProperty.DeviceType);
i = (Int32)ti.ApiType;

?VB 4TypeInfoSubType
Dim ti As HomeSeer.PluginSdk.Devices.Identification.TypeInfo
Dim i As Integer
ti = CType(hs4.GetPropertyByRef(@d, HomeSeer.PluginSdk.Devices.EProperty.DeviceType), HomeSeer.PluginSdk.Devices.Identification.TypeInfo)
i = CInt(ti.SubType)

?CS 4TypeInfoSubType
HomeSeer.PluginSdk.Devices.Identification.TypeInfo ti;
Int32 i;
ti = (HomeSeer.PluginSdk.Devices.Identification.TypeInfo)hs4.GetPropertyByRef(@d, HomeSeer.PluginSdk.Devices.EProperty.DeviceType);
i = (Int32)ti.SubType;

?VB 4TypeInfoSubTypeDescription
Dim ti As HomeSeer.PluginSdk.Devices.Identification.TypeInfo
Dim s As String
ti = CType(hs4.GetPropertyByRef(@d, HomeSeer.PluginSdk.Devices.EProperty.DeviceType), HomeSeer.PluginSdk.Devices.Identification.TypeInfo)
s = ti.SubTypeDescription.ToString

?CS 4TypeInfoSubTypeDescription
HomeSeer.PluginSdk.Devices.Identification.TypeInfo ti;
String s;
ti = (HomeSeer.PluginSdk.Devices.Identification.TypeInfo)hs4.GetPropertyByRef(@d, HomeSeer.PluginSdk.Devices.EProperty.DeviceType);
s = ti.SubTypeDescription.ToString();

?VB 4TypeInfoSummary
Dim ti As HomeSeer.PluginSdk.Devices.Identification.TypeInfo
Dim s As String
ti = CType(hs4.GetPropertyByRef(@d, HomeSeer.PluginSdk.Devices.EProperty.DeviceType), HomeSeer.PluginSdk.Devices.Identification.TypeInfo)
s = ti.Summary.ToString

?CS 4TypeInfoSummary
HomeSeer.PluginSdk.Devices.Identification.TypeInfo ti;
String s;
ti = (HomeSeer.PluginSdk.Devices.Identification.TypeInfo)hs4.GetPropertyByRef(@d, HomeSeer.PluginSdk.Devices.EProperty.DeviceType);
s = ti.Summary.ToString();

?VB 4TypeInfoType
Dim ti As HomeSeer.PluginSdk.Devices.Identification.TypeInfo
Dim i As Integer
ti = CType(hs4.GetPropertyByRef(@d, HomeSeer.PluginSdk.Devices.EProperty.DeviceType), HomeSeer.PluginSdk.Devices.Identification.TypeInfo)
i = CInt(ti.Type)

?CS 4TypeInfoType
HomeSeer.PluginSdk.Devices.Identification.TypeInfo ti;
Int32 i;
ti = (HomeSeer.PluginSdk.Devices.Identification.TypeInfo)hs4.GetPropertyByRef(@d, HomeSeer.PluginSdk.Devices.EProperty.DeviceType);
i = (Int32)ti.Type;

?VB 4UserNote
Dim s As String
s = hs4.GetPropertyByRef(@d, HomeSeer.PluginSdk.Devices.EProperty.UserNote).ToString

?CS 4UserNote
String s;
s = hs4.GetPropertyByRef(@d, HomeSeer.PluginSdk.Devices.EProperty.UserNote).ToString();

?VB 4VoiceCommand
Dim s As String
s = hs4.GetPropertyByRef(@d, HomeSeer.PluginSdk.Devices.EProperty.VoiceCommand).ToString

?CS 4VoiceCommand
String s;
s = hs4.GetPropertyByRef(@d, HomeSeer.PluginSdk.Devices.EProperty.VoiceCommand).ToString();

?VB 4UserAccess
Dim s As String
s = hs4.GetPropertyByRef(@d, HomeSeer.PluginSdk.Devices.EProperty.UserAccess).ToString

?CS 4UserAccess
String s;
s = hs4.GetPropertyByRef(@d, HomeSeer.PluginSdk.Devices.EProperty.UserAccess).ToString();

?VB 4CanDim
Dim b As Boolean
b = CType(hs4.GetPropertyByRef(@d, HomeSeer.PluginSdk.Devices.EProperty.CanDim), Boolean)

?CS 4CanDim
Boolean b;
b = (Boolean)hs4.GetPropertyByRef(@d, HomeSeer.PluginSdk.Devices.EProperty.CanDim);

?VB 4IsLocation1First
Dim b As Boolean
b = hs4.IsLocation1First

?CS 4IsLocation1First
Boolean b;
b = hs4.IsLocation1First();

?VB 4FirstLocationName
Dim s As String
s = hs4.GetFirstLocationName

?CS 4FirstLocationName
String s;
s = hs4.GetFirstLocationName();

?VB 4SecondLocationName
Dim s As String
s = hs4.GetSecondLocationName

?CS 4SecondLocationName
String s;
s = hs4.GetSecondLocationName();

?VB IsLocation1First
Dim s As String
s = hs.GetINISetting("Settings", "bLocationFirst", "")

?CS IsLocation1First
String s;
s = hs.GetINISetting("Settings", "bLocationFirst", "");

?VB SendControl
Dim rc As Boolean
rc = hs4.SendControlForFeatureByValue(@d, @1)

?CS SendControl
Boolean rc;
rc = hs4.SendControlForFeatureByValue(@d, @1);

?VB ValueLabelGraphic
Dim Value As Double
Dim GraphicUrl As String
Dim ValueLabel As String
'
Dim aStatusGraphic As HomeSeer.PluginSdk.Devices.StatusGraphic
Value = CType(hs4.GetPropertyByRef(@d, HomeSeer.PluginSdk.Devices.EProperty.Value), Double)
aStatusGraphic = hs4.GetStatusGraphicForValue(@d, Value)
GraphicUrl = aStatusGraphic.Graphic
If aStatusGraphic.TryGetLabelForValue(ValueLabel, Value) Then
    ValueLabel = aStatusGraphic.GetLabelForValue(Value)
End If
If ValueLabel Is Nothing Then ValueLabel = ""

?CS ValueLabelGraphic
double Value;
string GraphicUrl;
string ValueLabel;
HomeSeer.PluginSdk.Devices.StatusGraphic aStatusGraphic;
Value = (double)hs4.GetPropertyByRef(@d, HomeSeer.PluginSdk.Devices.EProperty.Value);
aStatusGraphic = hs4.GetStatusGraphicForValue(@d, Value);
GraphicUrl = aStatusGraphic.Graphic;
if (aStatusGraphic.TryGetLabelForValue(out ValueLabel, Value))
{
    ValueLabel = aStatusGraphic.GetLabelForValue(Value);
}
if (ValueLabel == null) { ValueLabel = ""; }

?VB GetLabelFromStatusControl
'' Get formatted label from Status Control for DevRef @d
Dim aValue As Double
Dim aStatusControl As HomeSeer.PluginSdk.Devices.Controls.StatusControl
Dim anAdditionalStatusData As Collections.Generic.List(Of String)
Dim aLabel As String
aValue = CType(hs4.GetPropertyByRef(@d, HomeSeer.PluginSdk.Devices.EProperty.Value), Double)
aStatusControl = hs4.GetStatusControlForValue(@d, aValue)
anAdditionalStatusData = CType(hs4.GetPropertyByRef(@d, HomeSeer.PluginSdk.Devices.EProperty.AdditionalStatusData), Collections.Generic.List(Of String))
If aStatusControl Is Nothing Then
    aLabel = ""
Else
    If anAdditionalStatusData Is Nothing Then
        aLabel = aStatusControl.GetLabelForValue(aValue)
    Else
        aLabel = aStatusControl.GetLabelForValue(aValue, anAdditionalStatusData.ToArray)
    End If
End If

?CS GetLabelFromStatusControl
// Get formatted label from Status Control for DevRef @d
double aValue;
HomeSeer.PluginSdk.Devices.Controls.StatusControl aStatusControl;
System.Collections.Generic.List<string> anAdditionalStatusData;
string aLabel;
aValue = (double)hs4.GetPropertyByRef(@d, HomeSeer.PluginSdk.Devices.EProperty.Value);
aStatusControl = hs4.GetStatusControlForValue(@d, aValue);
anAdditionalStatusData = (System.Collections.Generic.List<string>)hs4.GetPropertyByRef(@d, HomeSeer.PluginSdk.Devices.EProperty.AdditionalStatusData);
if (aStatusControl == null)
{
    aLabel = "";
}
else
{
    if (anAdditionalStatusData == null)
    {
        aLabel = aStatusControl.GetLabelForValue(aValue);
    }
    else
    {
        aLabel = aStatusControl.GetLabelForValue(aValue, anAdditionalStatusData.ToArray());
    }
}

?VB GetLabelFromStatusGraphic
'' Get formatted label from Status Graphic for DevRef @d
Dim d As Double
Dim aSG As HomeSeer.PluginSdk.Devices.StatusGraphic
Dim AddStatusData As Collections.Generic.List(Of String)
Dim aLabel As String
d = CType(hs4.GetPropertyByRef(@d, HomeSeer.PluginSdk.Devices.EProperty.Value), Double)
aSG = hs4.GetStatusGraphicForValue(@d, d)
AddStatusData = CType(hs4.GetPropertyByRef(@d, HomeSeer.PluginSdk.Devices.EProperty.AdditionalStatusData), Collections.Generic.List(Of String))
If aSG Is Nothing Then
  aLabel = ""
Else
  If AddStatusData Is Nothing Then
    aLabel = aSG.GetLabelForValue(d)
  Else
    aLabel = aSG.GetLabelForValue(d, AddStatusData.ToArray)
  End If
End If

?CS GetLabelFromStatusGraphic
// Get formatted label from Status Graphic for DevRef @d
double d;
HomeSeer.PluginSdk.Devices.StatusGraphic aSG;
System.Collections.Generic.List<string> AddStatusData;
string aLabel;
d = (double)hs4.GetPropertyByRef(@d, HomeSeer.PluginSdk.Devices.EProperty.Value);
aSG = hs4.GetStatusGraphicForValue(@d, d);
AddStatusData = (System.Collections.Generic.List<string>)hs4.GetPropertyByRef(@d, HomeSeer.PluginSdk.Devices.EProperty.AdditionalStatusData);
if (aSG == null)
  { aLabel = ""; }
else
  if (AddStatusData == null)
    { aLabel = aSG.GetLabelForValue(d); }
  else
    { aLabel = aSG.GetLabelForValue(d, AddStatusData.ToArray()); }

?VB GetFullNameByRef
Imports tenGlobalMethods
Dim Fullname As String()
Dim Devicename, Featurename As String
Fullname = GetFullnameByRef(hs4, @d)
Devicename = Fullname(0)
Featurename = Fullname(1)
' Requires tenGlobalMethods.dll
'     https://tenholder.net/tenWare2/ScriptingExtensions/Overview.aspx

?CS GetFullNameByRef
using tenGlobalMethods;
string[] Fullname;
string Devicename, Featurename;
Fullname = ten.GetFullnameByRef(hs4, 541);
Devicename = Fullname[0];
Featurename = Fullname[1];
// Requires tenGlobalMethods.dll
//     https://tenholder.net/tenWare2/ScriptingExtensions/Overview.aspx

?VB FeatureRefByFullname
Imports tenGlobalMethods
Dim i1 As Integer
i1 = GetFeatureRefByFullname(hs, "@1", "@2")
' Requires tenGlobalMethods.dll
'     https://tenholder.net/tenWare2/ScriptingExtensions/Overview.aspx

?CS FeatureRefByFullname
using tenGlobalMethods;
int i1;
i1 = ten.GetFeatureRefByFullname(hs, "@1", "@2");
// Requires tenGlobalMethods.dll
//     https://tenholder.net/tenWare2/ScriptingExtensions/Overview.aspx

?VB SendControlUse
hs4.SendControlForFeatureByValue(@d, hs4.GetFeatureByRef(@d).GetFirstControlForUse(HomeSeer.PluginSdk.Devices.Controls.EControlUse.@1).TargetValue)

?CS SendControlUse
hs4.SendControlForFeatureByValue(@d, hs4.GetFeatureByRef(@d).GetFirstControlForUse(HomeSeer.PluginSdk.Devices.Controls.EControlUse.@1).TargetValue);

?VB Hs4Misc
Dim b as Boolean
b = hs4.IsFlagOnRef(@d,HomeSeer.PluginSdk.Devices.EmiscFlag.@1)

?CS Hs4Misc
Boolean b;
b = hs4.IsFlagOnRef(@d, HomeSeer.PluginSdk.Devices.EMiscFlag.@1);

?VB EventCopy
@1

?CS EventCopy
@1

!EOF