This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Set export option with script
#6
Save all objects IDs with export enabled to storage:
Code:
ids = db:getlist('SELECT id FROM objects WHERE export=1')
storage.set('export_ids', table.concat(ids, ','))

Restore from storage:
Code:
ids = storage.get('export_ids')
if type(ids) == 'string' and #ids > 0 then
  db:query('UPDATE objects SET export=1 WHERE id IN (' .. ids .. ')')
end
script.reloadbacnet()
Reply


Messages In This Thread
RE: Set export option with script - by admin - 21.06.2021, 06:42
RE: Set export option with script - by admin - 31.05.2023, 06:44
RE: Set export option with script - by admin - 31.05.2023, 11:45

Forum Jump: