# Search and Replace with UDT parameters

**URL:** <https://forum.inductiveautomation.com/t/search-and-replace-with-udt-parameters/58685>\
**Category:** Ignition\
**Created:** [April 21, 2022, 1:02pm UTC](https://forum.inductiveautomation.com/t/search-and-replace-with-udt-parameters/58685 "2022-04-21T13:02:46Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![bwhite](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bwhite/32/7112_2.png) [@bwhite](https://forum.inductiveautomation.com/u/bwhite)\
**Post date:** [April 21, 2022, 1:02pm UTC](https://forum.inductiveautomation.com/t/search-and-replace-with-udt-parameters/58685/1 "2022-04-21T13:02:47Z")

</div>

I imported a project and need to change the name of the PLC connection. I did a search and replace on the PLC name and changed all the references to the device name. However, the search and replace will not allow me to change the PLC name in the parameters of a UDT. Does anyone know how to get the search and replace to replace the parameter in the UDT? Otherwise I have to go through each UDT separately. ;-(

---

<div class="post-metadata">

**Author:** ![andrews](https://avatars.discourse-cdn.com/v4/letter/a/898d66/32.png) [@andrews](https://forum.inductiveautomation.com/u/andrews)\
**Post date:** [April 23, 2022, 5:46am UTC](https://forum.inductiveautomation.com/t/search-and-replace-with-udt-parameters/58685/2 "2022-04-23T05:46:34Z")

</div>

I could be very wrong. But when I open the search and replace it doesn’t say it checks params in UDTs. So I don’t think that is possible. I just tried, and was able to track it in the instances, but not in the UDT definition.

There might be a way to script it. But I’d have to dig through the java docs to verify, as i’m still trying to soak that all up.

How many UDTs do you have?

---

<div class="post-metadata">

**Author:** ![bwhite](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bwhite/32/7112_2.png) [@bwhite](https://forum.inductiveautomation.com/u/bwhite)\
**Post date:** [April 25, 2022, 12:56pm UTC](https://forum.inductiveautomation.com/t/search-and-replace-with-udt-parameters/58685/3 "2022-04-25T12:56:58Z")

</div>

I had about 300 UDT’s. I just went through them manually and made the change.

---

<div class="post-metadata">

**Author:** ![nicholas.robinson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nicholas.robinson/32/22188_2.png) [@nicholas.robinson](https://forum.inductiveautomation.com/u/nicholas.robinson)\
**Post date:** [April 28, 2022, 4:41am UTC](https://forum.inductiveautomation.com/t/search-and-replace-with-udt-parameters/58685/4 "2022-04-28T04:41:40Z")

</div>

@bwhite assuming you are talking about changing the parameters on the UDT instances, you’d read them like this and then based on whatever change you needed, build a list of write values and write back to the same read paths but with your new desired values:

```auto
ext = "/Parameters.plcName"
browse = system.tag.browse("[BNV6094_2]WynrightNew")
readPaths = [str(tag["fullPath"])+ext for tag in browse if "ACL" in tag["typeId"]]
vals = [tag.value for tag in system.tag.readBlocking(readPaths)]

```

I know its too late and you’ve already done then manually but hopefully it can help if this comes up again in the future.

Cheers,

Nick

---

<div class="post-metadata">

**Author:** ![bwhite](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bwhite/32/7112_2.png) [@bwhite](https://forum.inductiveautomation.com/u/bwhite)\
**Post date:** [April 28, 2022, 12:28pm UTC](https://forum.inductiveautomation.com/t/search-and-replace-with-udt-parameters/58685/5 "2022-04-28T12:28:05Z")

</div>

Thank you. I will keep this for future reference!
