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.

LogicMachine - Modify Objects name
#1
Good evening,

I've loaded a Logic Machine 5 with a large number of objects, some virtual, some standard, etc.

My question stems from another issue: the vast majority of these objects share two letters that are almost always repeated, specifically the following naming convention: "P1". (Image attached.)

My question is quite simple: I want to create a backup and load these objects into two other Logic Machines. The problem is that in the second and third Logic Machines, instead of "P1", I need to replace it with "P2" and "P3".

Is it possible to do this without having to go object by object? Is there a quick way to do it? Thank you very much.

Best regards,
Alejandro A.

Attached Files Thumbnail(s)
   
Reply
#2
You can use grp.create in script
https://kb.logicmachine.net/libraries/lu...eateconfig
just make sure to add forcename = true to grp.create config to overwrite name for an existing object
------------------------------
Ctrl+F5
Reply
#3
Run this script once:
Code:
db:query('UPDATE objects SET name=REPLACE(name, "P1", "P2")')
Reply
#4
I understand what you're saying I should do, the problem is that would only change the name to P2. What I'm trying to do is change this:

BA_P1-4_A--CONSUMOS.Energia_Electrica

BA_P2-4_A--CONSUMOS.Energia_Electrica

upps, sorry, I didn't see last answer, thanks
Reply


Forum Jump: