Announcement

Collapse
No announcement yet.

Icon Script help please

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

    Icon Script help please

    Hi Guys
    As I am using some Plugins that assign thier own Icons for devices, such as RFXCOM and the COMFORT plugin, and with the comfort plugin it uses counters for my CBUS status, which can have a range 0 to 255.
    This courses problems when trying to use Icons on A floorplan for example. I know this is a known issue.
    However I was hoping to use the script below that I found in another thread to get around this.

    Problem is, what if I have a number of devices which I have, I dont want to have a script for each one.
    what would I need to do this script if I say had 30 devices. Is this the full script or would there be a lot more to it. Is it just a case of saving what is below in a VB file and it will work

    Thanks
    Mark


    The following vb.net assumes a virtual device that already has the free space (in GBs) saved in its devicevalue. replace the square brackets [] with triangle brackets <>

    save as freespace.vb and run as hs.runex "freespace.vb","main","" from action of event


    sub main(parms as object)

    select case hs.devicevalue("a1")
    case is <= 2
    hs.setdevicestring ("a1","[img src=error.gif]")
    case 2 to 10
    hs.setdevicestring ("a1","[img src=warning.gif]")
    else
    hs.setdevicestring ("a1","[img src=ok.gif]")
    end select
    end sub
Working...
X