Announcement

Collapse
No announcement yet.

Problems with Apostrophe

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

    Problems with Apostrophe

    Hi Guys,
    I'm using HS2 but hope you can help me here anyway.
    I found a partial answer in the mcs sprinker section, but it was not ecouraging.

    I am writng values to a mdb database. The HAI plug-in assigned my counter values with an '. And yes there are 99 of them. It would be difficult to re-assign the entire HAI system and homeseer doesn't provide a way to re-assign HAI system values. so I am hopeful you guys can help.

    objRS("fan") = hs.devicevalue("'20")
    objRS("fan") = hs.devicevalue("'''20")
    objRS("fan") = hs.devicevalue("'"&"20")
    objRS("fan") = hs.devicevalue(chr(39)&"20")

    all do not work and will not record a value.

    objRS("fan") = hs.devicevalue("_20") or ("]20") or ("#20") all do work in my script.

    Trying to retire, I was hoping to find time to get all this stuff up and running again. After weeks assigning names & values I ran in to this issue.

    Is it back to square 1 ?
    Thanks in advance,
    Paul

    #2
    The problem you are running into is that visual basic treats an apostrophe as a comment character, so it disregards everything after it on the line.

    The only alternative I can think of is to use DeviceValueByName instead. It will be tedious to change, but copy/paste will help reduce the typing. Note: the device name consists of the location and the device name itself.
    Attached Files
    Mike____________________________________________________________ __________________
    HS3 Pro Edition 3.0.0.548, NUC i3

    HW: Stargate | NX8e | CAV6.6 | Squeezebox | PCS | WGL 800RF | RFXCOM | Vantage Pro | Green-Eye | Edgeport/8 | Way2Call | Ecobee3 | EtherRain | Ubiquiti

    Comment


      #3
      Jon

      Comment


        #4
        Good point. But if the HC is really ` and not ', then the solution may be just being sure to use the ` in the devicevalue() argument. That could be fixed using find/replace I think.
        Mike____________________________________________________________ __________________
        HS3 Pro Edition 3.0.0.548, NUC i3

        HW: Stargate | NX8e | CAV6.6 | Squeezebox | PCS | WGL 800RF | RFXCOM | Vantage Pro | Green-Eye | Edgeport/8 | Way2Call | Ecobee3 | EtherRain | Ubiquiti

        Comment


          #5
          Originally posted by Uncle Michael View Post
          Good point. But if the HC is really ` and not ', then the solution may be just being sure to use the ` in the devicevalue() argument. That could be fixed using find/replace I think.
          It could but I was just highlighting which character code it was.
          Jon

          Comment


            #6
            Thanks

            Thanks Jon & Michael,
            It was in fact the "tick"? rather than apostrophe.
            change to ` was all it needed.
            Feeling a little dumb for not noticing, but overjoyed that it worked !
            Old people should probably wear their glasses more often
            On to the next project.
            Thanks
            Paul

            Comment

            Working...
            X