tblrename
(tblrename table_type old_name new_name)
The tblrename function allows the renaming of a table entry (table item).
In a drawing database table the entry old_name is replaced by the entry new_name.
Arguments
table_type specifies valid names of table types are: BLOCK, DIMSTYLE, GROUP, LAYER, LTYPE, STYLE, UCS, and VIEW.
old_name specifies the name of the table item to be renamed (as text string).
new_name specifies the new name for the table item (as text string).
Notes:
Renaming entries in the tables BLOCK, DIMSTYLE, or STYLE cause that the entire drawing database is updated and that the drawing is redrawn.
If a group name in the table GROUP is renamed, also all associated group information in the entities are updated.
Records of APPID and VPORT tables cannot be renamed.
You can also use the tblrename function to rename anonymous blocks. In this case, the new_name parameter has to be e.g. "*U" or "*X" without a number.
The return string contains the new name of the table item, if the renaming was successful.
: (tblrename "LAYER" "ABC" "XYZ")
"XYZ"