How to replace a device?

This question actually already has an answer, but it is from the old forum and I thought it would be handy to replicate it here:

Question: How do I replace a device with a new one when my setup changes? For example, when my Sony Blu-ray Player breaks (or is upgraded) and I need to replace it with a Panasonic 4k Blu-ray player?

Answer: There is no built-in way in the designer to do it. Instead, what Bill recommended was to rename your project from “myproject.hrp” to “myproject.zip” (HRP files are just zip files with a different extension) and extract the contents. Then do a global Find & Replace in a program like VS Code or Notepad++ to replace the device name everywhere it is referenced. Once the names have been updated, repackage the HRP while maintaining the same directory structure. Make sure you don’t add an additional root directory. You need the same directory structure as the original.

To add a little bit of clarity to the answer: in Windows, after you have renamed the HRP, you can extract the contents by right-clicking on “myproject.zip” and selecting “Extract all…”. That will then unzip the project into a directory called “myproject”. After you have made your changes, you will want to go into the “myproject” directory and select everything and then right-click and select “Send to–>Compressed (zipped) folder” rather than simply right-clicking on the “myproject” folder in order to keep the directory structure the same. Then just change the new “myproject.zip” back to “myproject.hrp”.