Find/Replace Tag Value Question

We are interested in searching for a tag value within a project. We have a number of string tags within UDTs that hold values we may need to find through the course of our development. We have tried using the Find/Replace option in the Designer, but it only seems to find tag names and not their values. Is it possible to search for the tag value of a string tag within a UDT?

Thanks

1 Like

Unfortunately no, tag values are not searchable using find replace.

You should be able to accomplish this through scripting using system.tag.browseTags, system.tag.read and system.tag.write.

If you have a lot of tags this could be a long running script though.

Or you could export your entire tag tree, do your search & replace, then import it back.

I was able to do this using system.tag.browseTags, system.tag.read and system.tag.write as suggested below.

Thanks

How about trying to find all the places where a Tag is set?
I have where the TagValue is collected but I don’t know who/where/how/when it gets set.

Seems like a major oversight on an otherwise robust, powerful find/replace with contextual, wildcard, & custom filters. We frequently use paths, strings, etc. and being able to use replace() function in scripting at runtime but NOT in the Designer's find/replace tool is extremely frustrating. Seems like it would've been straightforward to have one of the contextual checkboxes handle whether or not tag values are modifiable by the replace button.

I've got some scripts I wrote (but with no GUI) that I've set up to export values to an Excel (XLSX, not CSV) file of selected properties/tags inside a UDT (or an atomic tag) for all tags of the same datatype. I use it for rapidly filling in information like descriptions, setpoints, scaling, engineering units, etc. It allows me to send it to our customer or if they provided a spreadsheet of the info, I can copy/paste between their spreadsheet and mine, then import/load the data back into the tags, and it works surprisingly fast even for thousands of tag/property values cause I read/write the values in large arrays rather than one-by-one.

I may try to put more polish on it, give it a GUI, and post it on the exchange when I get some time.

1 Like