Posts: 6
Threads: 2
Joined: Feb 2018
Reputation:
0
Hi LM community!
Just wondering if there is any way to mass edit the object name in the objects tab of the LM5? I want to change part of the name, like the find and replace tool in ETS.
B.R
BA
Posts: 411
Threads: 103
Joined: Oct 2016
Reputation:
9
I use this script for changing icons. Maybe it can help you in looking for the solution. Simply look for correct table.
oldicon = 'oldicon.svg'
newicon = 'newicon.svg'
db:query('UPDATE visobjects SET params=replace(params,?,?)', oldicon, newicon)
LM5Lp, firmware: 2018.08.22 and 2021.12.15, FlashSYS v2, ARMv7 Processor rev 5 (v7l), kernel 4.4.151 and 4.4.259
Posts: 411
Threads: 103
Joined: Oct 2016
Reputation:
9
It depends on your design. What I've done is I reserved a subgroup in my group objects list for testing and development purposes. This is the main storage for this kind of scripts. I suppose you to use data type 'bit' for these scripts because there's a bug in LM causing some other data types can't be run directly from the IDE.
The database structure is available here in forum in some different thread. Alternatively you can read it from the internal database directly. The process how to do it has been described here too.
LM5Lp, firmware: 2018.08.22 and 2021.12.15, FlashSYS v2, ARMv7 Processor rev 5 (v7l), kernel 4.4.151 and 4.4.259
Posts: 7762
Threads: 42
Joined: Jun 2015
Reputation:
447
Do you have a reproducible example of "Run script" not working from editor?
Posts: 1764
Threads: 6
Joined: Jul 2015
Reputation:
117
Hi,
I always use a resident script at 60 sec to execute special function scripts like this one. Just enable the script and disable it within 60 sec, but i always put script.disable(_SCRIPTNAME) at the end to have it self disabling.
I’m not aware of any bug here and think there is none ...
BR,
Erwin
Posts: 6
Threads: 2
Joined: Feb 2018
Reputation:
0
Thank you Erwin, your script worked great!!
BR,
BA
Posts: 411
Threads: 103
Joined: Oct 2016
Reputation:
9
(23.02.2018, 17:19)admin Wrote: Do you have a reproducible example of "Run script" not working from editor?
I'm sorry I can't repeat it now. Maybe the issue has been solved.
LM5Lp, firmware: 2018.08.22 and 2021.12.15, FlashSYS v2, ARMv7 Processor rev 5 (v7l), kernel 4.4.151 and 4.4.259