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.

Rename group addresses
#1
Hello,

I need to edit the names of the group addresses in bulk. For example, from group 1/1:
1/1/1 -> LIGHTING - ON/OFF - L01
1/1/2 -> LIGHTING - ON/OFF - L02
and so on...
1/1/100 -> LIGHTING - ON/OFF - L100

Only the object name needs to be changed, without modifying labels or data types.
Reply
#2
Do you want to just set names of your object to the rule defined above or modify them?
------------------------------
Ctrl+F5
Reply
#3
(19.08.2026, 13:08)Daniel Wrote: Do you want to just set names of your object to the rule defined above or modify them?

I want to set the names from scratch using the defined rule (ILUMINACION - ON/OFF - L01 up to L100) based strictly on their Group Addresses.

My object database is currently inconsistent:

Some objects have old, different names.

Some objects have no name at all (blank/empty).
Reply
#4
Run this script once
Code:
-- Bulk rename: 1/1/1 → LIGHTING - ON/OFF - L01 ... 1/1/100 → LIGHTING - ON/OFF - L100 for i = 1, 100 do   local addr  = string.format('1/1/%d', i)   local name  = string.format('LIGHTING - ON/OFF - L%02d', i)   -- grp.create overwrites an existing object's name without touching   -- its datatype, tags, comment, or value — when you pass only   -- address + name + forcename=true.   local ok, err = grp.create({     address   = addr,     name      = name,     forcename = true,   -- replace the name even if the object already exists   })   if ok then     log(string.format('Renamed %s → "%s"', addr, name))   else     log(string.format('SKIP %s (does not exist or error: %s)', addr, tostring(err)))   end end log('Bulk rename complete.')
------------------------------
Ctrl+F5
Reply


Forum Jump: