Announcement

Collapse
No announcement yet.

CAPIControl Buttons ?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • lpitman
    replied
    Thanks that did the trick.

    Leave a comment:


  • rmasonjr
    replied
    You want to use SetIOMulti()
    It will send you a list of the CAPIControl objects. You then iterate through and grab the device reference id to do what you want.

    Leave a comment:


  • lpitman
    started a topic CAPIControl Buttons ?

    CAPIControl Buttons ?

    I have created devices that show up in the Device Management tab page with buttons and when the buttons are pressed I get an indication that they were pushed but how/where is the the code that gets executed? In HS2 we had functions like ButtonPressed() to deal with the code for the buttons. What do we use now? This is the code used to create buttons:

    Code:
                Pair = New VSPair(ePairStatusControl.Both)   ' This is what appears in the device actions...
                Pair.PairType = VSVGPairType.SingleValue
                Pair.Value = 0
                Pair.Status = "OFF"
                Pair.Render = Enums.CAPIControlType.Button
    
                If Not hs.DeviceVSP_AddPair(dvRef, Pair) Then               
                End If
    
                Pair = New VSPair(ePairStatusControl.Both)   ' This is what appears in the device actions...
                Pair.PairType = VSVGPairType.SingleValue
                Pair.Value = 1
                Pair.Status = "ON"
    
                If Not hs.DeviceVSP_AddPair(dvRef, Pair) Then          
                End If
    What would the code look like?
    Last edited by lpitman; May 22nd, 2013, 09:05 AM.
Working...
X