27.09.2023, 11:46
Use this:
Code:
--Best way is to tag your objects with a specific tag for each different COV value and then run this script once:
covincr = 0.1
tag = 'mycovtag1'
db:query('UPDATE objects SET covincr=? WHERE id IN (SELECT object FROM objecttags WHERE tag=?)', covincr, tag)
covincr = 0.5
tag = 'mycovtag2'
db:query('UPDATE objects SET covincr=? WHERE id IN (SELECT object FROM objecttags WHERE tag=?)', covincr, tag)
os.execute('/etc/init.d/bacnet restart')
script.disable(_SCRIPTNAME)
--or
covincr = 0.1
db:query('UPDATE objects SET covincr=? WHERE export = 1', covincr)
os.execute('/etc/init.d/bacnet restart')
script.disable(_SCRIPTNAME)