Help
  • Explore Community
  • Get Started
  • Ask the Community
  • How-To & Best Practices
  • Contact Support
Notifications
Login / Register
Community
Community
Notifications
close
  • Forums
  • Knowledge Center
  • Events & Webinars
  • Ideas
  • Blogs
Help
Help
  • Explore Community
  • Get Started
  • Ask the Community
  • How-To & Best Practices
  • Contact Support
Login / Register
Sustainability
Sustainability

We Value Your Feedback!
Could you please spare a few minutes to share your thoughts on Cloud Connected vs On-Premise Services. Your feedback can help us shape the future of services.
Learn more about the survey or Click here to Launch the survey
Schneider Electric Services Innovation Team!

Search & Replace - SEAL Script

EcoStruxure SEAL Forum

This forum is for engineers working EcoStruxure Building Operation, wanting to leverage the SEAL application to improve the efficiency in the engineering process.

cancel
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Home
  • Schneider Electric Community
  • EcoStruxure Building
  • EcoStruxure SEAL Forum
  • Search & Replace - SEAL Script
Options
  • Mark Topic as New
  • Mark Topic as Read
  • Float this Topic for Current User
  • Bookmark
  • Subscribe
  • Mute
  • Printer Friendly Page
Invite a Co-worker
Send a co-worker an invite to the portal.Just enter their email address and we'll connect them to register. After joining, they will belong to the same company.
You have entered an invalid email address. Please re-enter the email address.
This co-worker has already been invited to the Exchange portal. Please invite another co-worker.
Please enter email address
Send Invite Cancel
Invitation Sent
Your invitation was sent.Thanks for sharing Exchange with your co-worker.
Send New Invite Close
Top Experts
User Count
StefanLundin
Commander StefanLundin Commander
30
Benji
Administrator Benji Administrator
9
Jim.T
Ensign Jim.T Ensign
4
APA
Lieutenant APA Lieutenant
3
View All

Invite a Colleague

Found this content useful? Share it with a Colleague!

Invite a Colleague Invite
Back to EcoStruxure SEAL Forum
StefanLundin
Commander StefanLundin Commander
Commander

Posted: ‎2025-01-22 06:26 AM . Last Modified: ‎2025-01-22 09:57 PM

0 Likes
0
476
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

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 & Replace - SEAL Script

The Concept

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. 

StefanLundin_4-1737553454453.png

 

 

 

Single Text Phrase

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.

StefanLundin_3-1737552922252.png

 

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.

Multiple Text Phrases

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

 

Operators

  • Contains
  • Starts With
  • Ends With
  • Regular Expressions 
  • Case-Sensitive Match
  • Use Custom Regex Flags

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.

 

Object Types

  • Alarms
  • Function Block Programs
  • Script Programs/Functions
  • Schedules
  • Trend Logs
  • Trend Charts
  • Values
  • Values (Segment)
  • Graphics
  • Folders
  • Folders (Segment)
  • Other

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.

Object Properties

  • Name
  • BACnet Name
  • Description
  • Note 1
  • Note 2
  • Label text
  • Alarm and reset message
  • Source name prefix

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

  • Graphics
  • Function Block Programs 
  • Script Programs/Functions

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. 

Attachments
Labels
  • Labels:
  • Script
  • Tags:
  • english
Reply
Contact Support

Link copied. Please paste this link to share this article on your social media post.

  • All forum topics
  • Previous Topic
  • Next Topic
Replies 0
Preview Exit Preview

never-displayed

You must be signed in to add attachments

never-displayed

 
To The Top!

Forums

  • APC UPS Data Center Backup Solutions
  • EcoStruxure IT
  • EcoStruxure Geo SCADA Expert
  • Metering & Power Quality
  • Schneider Electric Wiser

Knowledge Center

Events & webinars

Ideas

Blogs

Get Started

  • Ask the Community
  • Community Guidelines
  • Community User Guide
  • How-To & Best Practice
  • Experts Leaderboard
  • Contact Support
Brand-Logo
Subscribing is a smart move!
You can subscribe to this board after you log in or create your free account.
Forum-Icon

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.

Register today for FREE

Register Now

Already have an account? Login

Terms & Conditions Privacy Notice Change your Cookie Settings © 2025 Schneider Electric

This is a heading

With achievable small steps, users progress and continually feel satisfaction in task accomplishment.

Usetiful Onboarding Checklist remembers the progress of every user, allowing them to take bite-sized journeys and continue where they left.

of