---
title: "Edit SCL files"
---

# Edit SCL files

How the module changes an SCL file (exactly what was asked, every other byte as it was, one Undo step, never saved for you), and how to rename an IED in every reference.

**State:** Rename IED and the text patches are verified on the public SCL files. The other edits (addresses, subscriptions, data set members) are modelled: tested on hand-written files, and checked by RiseClipse 1.3.0 on the outputs from the public files. No vendor tool has opened a file edited here.

## How every edit works

Every change the module makes to an SCL file, from a command, an editor or an agent tool, follows the same rules:

- **Only what was asked changes.** The edit is a text patch placed at the exact offsets the reader keeps; every other byte stays as it was.
- **The file's own style is kept:** tabs or spaces, its indentation, its line endings and its SCL namespace prefix.
- **Schema order is kept.** A new element, such as an `Address` of a GSE or SMV or an `Inputs` in LN0, goes where IEC 61850-6 orders it, so a valid file stays valid against the IEC schema.
- **One Undo step.** The edit is applied to the editor's text as one change, and one Undo takes all of it back.
- **Not saved.** The file is marked as changed; you save it.
- **A refused edit changes nothing**, and says why.

The edits available:

| Edit | Where |
|---|---|
| Rename an IED | **Rename IED** (below) |
| Set an address part (IP, mask, gateway, MAC, APPID, VLAN-ID, VLAN-PRIORITY) | Communication tab of the System editor |
| Subscribe and unsubscribe an input | Data Flow tab |
| Data sets, members and control blocks | Control Blocks tab |
| Add an IED from its ICD or IID; update an IED from its IID | **Add IED from ICD/IID...**, **Update IED from IID...** |
| Relay setting values and groups | Relay Settings editor |
| confRev, the Header and History | Problems quick fix, **Record Revision...** |
| The SCL edition | **Upgrade SCL Edition...** |

Edits to the text need a file with consistent line endings.

## Rename an IED

1. Open the SCL file and run **Rename IED**.
2. Pick the IED and type the new name.
3. Every reference to the IED in the file changes. Vendor `Private` data is left as it is.
4. Check the changes in the text. One Undo puts all of it back.

**Verified:** Rename IED on 210 public files. The semantic compare names exactly the IED removed and added and its references, the checks find the same rules as before, and renaming back gives the original bytes.

## What was verified for every edit

- On the public files: setting every attribute of every file to its own value keeps the bytes.
- On hand-written files: each edit's exact resulting text is pinned; subscribe then unsubscribe, and add then remove a member, restore the file byte for byte; CRLF and space-indented files keep their style; every edited file still reads as SCL with no finding.
- RiseClipse 1.3.0, an independent SCL validator, finds nothing new in what the edits write on the public files.

## Not verified

- Subscribe, unsubscribe, data set member and address edits on vendor files (only Rename IED was run on them).
- A vendor tool opening a file edited here. Before a file leaves for site, open it in the tool that will use it.
- Windows.
