Ask our Experts
Didn't find what you are looking for? Ask our experts!
Ask Me About Webinar: Data Center Assets - Modeling, Cooling, and CFD Simulation
Join our 30-minute expert session on July 10, 2025 (9:00 AM & 5:00 PM CET), to explore Digital Twins, cooling simulations, and IT infrastructure modeling. Learn how to boost resiliency and plan power capacity effectively. Register now to secure your spot!
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.
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.