Ask our Experts
Didn't find what you are looking for? Ask our experts!
This forum is for engineers working EcoStruxure Building Operation, wanting to leverage the SEAL application to improve the efficiency in the engineering process.
Search in
Link copied. Please paste this link to share this article on your social media post.
Posted: 2025-01-22 06:26 AM . Last Modified: 2025-01-22 09:57 PM
Search and replace is a script that allows you to search for text phrases and replace them with something else. It is a valuable tool for speeding up tedious and time-consuming renaming tasks by potentially saving you hours or even days of work, depending on the scope of the task. Furthermore, the script supports multiple text phrases, replaces content inside container objects and narrows the scope of the search with customizable options.
Additionally, you adjust the range of where to search by setting the base path on the left side. This feature is compulsory to all SEAL scripts.
In the Search for field, you enter what you want to find. In the Replace with field, you enter what you want to replace the matching phrase with.
By default, the script replaces all occurrences of matching strings without prompting for each instance, so make sure to specify search strings in a way that makes it only matches the parts you actually want to change. This can either be done by customizing the various options available like interlocking matching phrases with operators or by specifying object types and the properties that should be affected.
What really makes this script powerful is the ability to search and replace multiple text phrases using a spreadsheet where each row represents a unique text phrase, column A contains the phrase to be searched for and column B contains the phrase to be replaced with. (Example attached)
| Column A | Column B | |
| Row 1 | ReplaceThisText | WithThis |
| Row 2 | AndThis | WithThisText |
The script executes using the Contains operator by default. For anyone not familiar with the term, this simply indicates a search for any content that contains the specified text phrase, regardless of any text that resides either before or after the match in a string.
Similarly, the Starts with or Ends with operators indicates a search for any content that starts or ends with the specified text phrase, ignoring anything before or after the match. Additionally, Case-Sensitive Matching is by default active, uncheck to make sure the search returns all strings that includes the matching combination, regardless of uppercase and lowercase letters.
When selecting Regular Expression, all input will be interpreted as JS RegExp patterns. For more information regarding how to use Regular Expressions and Custom Regex Flags read this post.
Narrow or widen the search by filtering what type of objects can be affected. Any object type not selected will be excluded from the search. Please note that Segment values is unchecked by default, as any changes to the Name property for segment objects need to be done carefully in order not to make incidental alterations to combined segments set by rezoning as their naming needs to be intact in order to match and function properly.
The general properties that are common amongst various types of object types can either be included or excluded from the search criteria. By default, the search includes the Name property and BACnet Name property. This simply means that any potential match in excluded properties are ignored and will not be processed by the script.
Container objects are bodies that contain runtime objects with a set of properties and logic. Any content stored inside these objects that matches the configured search string criteria will be replaced.
Bound values are kept intact by taking by making sure the bind path reflects any change done if an object is renamed, meaning database content can be excessively altered without resulting in deterioration.
The advantage of being able to replace content of container objects at the same time as other objects and their properties elsewhere in the database while simultaneously keeping any bindings intact so they are not lost when renaming has the potential of increasing the time-efficiency compared to doing this manually by several orders of magnitude.
The Search and Replace Script is one of our standard script available in the Standard tab when using the SEAL Script utility.
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2025-09-18 05:22 AM
This is a great tool and I use it a lot, but it is little bit irritating to check all the checkboxes every time for object types and properties. Adding a Select all button would be appreciated. However having graphics selected in the container objects by default might be risky, there's a big chance of breaking something by accident. Thanks 😎
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2025-09-18 05:45 AM
Thanks - I've added this request in our backlog (ENX-11801)
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2025-10-22 12:14 PM
This has options for matching object names with operators:
Would it be hard to add an option for "Exact match?" For example, I want to rename SaTmp->SUPTEMP but I don't want to rename SaTmpSpt to SUPTEMPSpt.
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2025-10-22 10:31 PM
Hi @DavidFisher
Your example could be solved using regex. Use anchors to enforce an exact match:
^SaTmp$
^ = start of string$ = end of stringThis matches only SaTmp and not SaTmpSpt.
Combine with the Case-Sensitive Match option if needed.
So technically, an “Exact match” option isn’t necessary — but let me know if there’s a use case I’m overlooking.
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2025-10-22 10:39 PM
Definitely not hard to implement exact match.
You can achieve that using the Regular expression option:
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2025-10-23 06:11 AM
But how would I accomplish that for every row in a CSV import. Is there a way in regex to reference a row of data?
Technically regex could also do contains, starts with, and ends with 😀 I was just thinking exact match is another common use case to add to those radio buttons.
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2025-10-23 10:04 AM
Absolutely, good point! It’s a really small adjustment to add “Exact Match” as an quick option. I’ve attached an updated script with this implemented, and I’ll make sure it’s included in the Standard Script.
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2025-10-23 11:55 PM
Not sure what the issue is with the CSV file, or maybe I just understood incorrectly. But If I have values like this
And use it with Regular Expression option in the script. It will work.
Before
And after the script
Link copied. Please paste this link to share this article on your social media post.
You’ve reached the end of your document
Create your free account or log in to subscribe to the board - and gain access to more than 10,000+ support articles along with insights from experts and peers.