To ensure that legacy Ballard configuration files can be successfully imported into the BTI XML Editor executable, follow these steps:
- Open Notepad++.
- Navigate to Plugins → Plugin Admin and install PythonScript.

- Notepad++ will restart.
- Navigate to Plugins → PythonScript → New Script.

- Paste the script below and save it as Add_IDs.py.
from Npp import *
import re
text = editor.getText()
count = 101
def repl(match):
global count
s = '<bti:commandMessageRef ID="%d"' % count
count += 1
return s
text = re.sub(
r'<bti:commandMessageRef(?![^>]*\\bID=)',
repl,
text
)
editor.setText(text)
notepad.messageBox("IDs added successfully!")
Note: You can also place the Python script in:
C:\Users\<username>\AppData\Roaming\Notepad++\plugins\config\PythonScript\scripts

- Open your XML file.
- Run the Add_IDs.py script.

- Once IDs are added successfully, you will see a confirmation prompt and updated code.

- Save and close the XML file.