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.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2025-01-22 07:04 AM
Duplicate and rename is a script that creates a copy of content (source) and puts it in a specified location (target). In that same process, the duplicated content can be renamed and potential existing content that exists in the target location can be replaced. Simply put, it's a flexible combination of mass duplication, mass distribution and mass alteration or replacement of content where one does not necessarily exclude or depend on the other. This will have profound impact on engineering-efficiency related to producing or modifying content.
The duplication part creates copies of one or multiple objects, folders with underlying content, controllers, devices, etc. The rename part then modifies the name of those objects, their BACnet name property or even content inside graphics intrinsic to their source based on file input. Finally, the replace part swaps content that already exists with new content. This can either be done sequentially in one execution or iterated over time in multiple runs.
It is important to emphasize that the script operates in a left to right order in regards to arranging colums properly. Each row represents a source to duplicate to a target and rename. Any field that is left empty will be ignored.
Creating lists of paths pointing to sources and targets can easily be built by performing searches and copying the results into the CSV-file.
Example 1:
Using two controllers (RP-C) with different configurations as a template to distribute multiple copies with unique application-specific names.
Column A | Column B | Column C | Column D | Column E | Column F | |
Row 1 | Source | Target | Target Name | APP1- | RmTmp | SaDpr |
Row 2 | /AS/BACnet Interface/IP Network/RPC_01 | /AS/BACnet Interface/IP Network | R101 | R101- | RmTmp101 | SaDpr101 |
Row 3 | /AS/BACnet Interface/IP Network/RPC_02 | /AS/BACnet Interface/IP Network | R102 | R102- | RmTmp102 | SaDpr102 |
Row 4 | /AS/BACnet Interface/IP Network/RPC_02 | /AS/BACnet Interface/IP Network | R103 | R103- | RmTmp103 | SaDpr103 |
Example 2:
Using one controller (RP-C) as a template to distribute multiple copies with unique application-specific names that contains a prefix.
Column A | Column B | Column C | Column D | Column E | |
Row 1 | Source | Target | Target Name | APP1-HtgVlv | APP1-ClgVlv |
Row 2 | /AS/BACnet Interface/IP Network/MPC_03 | /AS/BACnet Interface/IP Network | R104 | AHU1-HtgVlv1 | AHU1-ClgVlv1 |
Row 3 | /AS/BACnet Interface/IP Network/MPC_03 | /AS/BACnet Interface/IP Network | R105 | AHU1-HtgVlv2 | AHU1-ClgVlv2 |
Row 4 | /AS/BACnet Interface/IP Network/MPC_03 | /AS/BACnet Interface/IP Network | R106 | AHU1-HtgVlv3 | AHU1-ClgVlv3 |
Example 3:
Using one Modbus device as a template to create multiple copies with unique device names where the underlying content is not renamed.
Column A | Column B | Column C | Column D | |
Row 1 | Source | Target | Target Name | |
Row 2 | /AS/Modbus Master Network/VAV | /AS/BACnet Interface/IP Network\RPC_04\IO Resources\Modbus | AHU1-VavSaDpr4 | |
Row 3 | /AS/Modbus Master Network/VAV | /AS/BACnet Interface/IP Network\RPC_05\IO Resources\Modbus | AHU1-VavSaDpr5 | |
Row 4 | /AS/Modbus Master Network/VAV | /AS/BACnet Interface/IP Network\RPC_06\IO Resources\Modbus | AHU1-VavSaDpr6 |
This specifies what to do if any content with identical name already exists in the specified target path for the duplicated object name. Content can either be duplicated, distributed and replaced simultaneously in one run.
Replace will remove any existing content located in the target path and replace it with the content specified in the source path, allowing for scenarios like updating og re-distributing content that contains slight modifications to what currently exists in the target path. Skip will simply pass on each instance where content specified in the target path already exists and move on to the next item in the list. Stop will halt at the first instance where content specified in the target path already exists so it can be manually inspected.
Narrow or widen the scope by filtering what type of objects can be affected. Any object type not selected will be excluded from being renamed. 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.
Due to the nature of the script the Name property is always processed. However, the BACnet Name property can either be included or excluded from being renamed.
Container objects are bodies that contain runtime objects with a set of properties and logic. Any content stored inside these objects that matches the specified strings by name 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 Duplicate & Rename 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.
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.