Announcement

Collapse
No announcement yet.

class CAPIControl.clsValueRange

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

  • class CAPIControl.clsValueRange

    I'm trying to work out how to get all controll values for the device (using C#).
    What I find confusing - if I "Add New Range Value" (i.e. 1-99) in the device "Status Graphics" page - HS seems to create separate CAPIControl entries for each integer value in the range, i.e. Value1, Value2,...,Value99.
    Is it supposed instead to create a single CAPIControl entry and set its "clsValueRange Range" member?
    How do I know if the CAPIControl entry belongs to the range or not?

  • #2
    Images to illustrate the question/problem:

    Click image for larger version

Name:	Capture1.PNG
Views:	1
Size:	22.8 KB
ID:	1272215
    Click image for larger version

Name:	Capture2.PNG
Views:	1
Size:	11.2 KB
ID:	1272216

    Comment


    • #3
      There is a bool flag ‘singlerangeentry’ or something like that. If true you get back the single entry. If false HS explodes the list into individual. If working with devices you didn’t create be careful to never set false as I’ve seen ranges with millions of entries and HS running out of memory trying to build the list.

      Comment


      • #4

        Public Function CAPIGetControlEx(ByVal dvRef As Integer, _
        ByVal SingleRangeEntry As Boolean) As CAPIControl()

        Comment


        • #5
          Originally posted by bsobel View Post
          Public Function CAPIGetControlEx(ByVal dvRef As Integer, _
          ByVal SingleRangeEntry As Boolean) As CAPIControl()
          Thank you Bill, I'll try

          Comment


          • #6
            Thanks Bill, *CAPIGetControlEx* it is. Undocumented

            Comment


            • #7
              Originally posted by alexbk66 View Post
              Thanks Bill, *CAPIGetControlEx* it is. Undocumented
              Alex, its not undocumented, but HS (for reasons that are beyond bizarre) has split up the SDK into parts for developers and general users. You need to read the general users help too: https://homeseer.com/support/homeseer/HS3/HS3Help.pdf (its documented in there)

              Comment


              • #8
                Thank you again, I didn't think user manual is more helpful Whoa 408 pages

                Comment


                • #9
                  Originally posted by alexbk66 View Post
                  Thank you again, I didn't think user manual is more helpful Whoa 408 pages
                  I totally get it. You are experiencing exactly what I did about a year ago. Finally in a place where I can talk reasonably accurately on plugin development, albeit even now finding surprises.

                  Comment

                  Working...
                  X