Prerequisites:
The station must be running and opened in
Workbench, with the program module installed on the
Niagara host. The ProgramService must be in the station’s Services folder.
CAUTION: Before using the Batch Editor, always save and backup the station. It is easy to make errors using the Batch Editor, and there is no undo. Therefore in a worst-case scenario, you can always reinstall the saved station from your backup.
The Batch Editor allows you to change a config flag in a selected slot in multiple components. In the context of display names, this can be useful applied to the displayNames slot of any component that has one or more child slots with display names assigned.
For example:
- To clear (remove) the “Readonly” flag on displayNames slots, to allow batch editing.
- To set the “Hidden” flag on batch-added displayNames slots, to prevent displayNames from appearing on a property sheets.
Optionally, you could also set the “Operator” flag, to allow future operator-level edits of display names, and set the “Readonly”
flag (if you are finished batch editing them).
NOTE: Any displayNames slot added by the Batch Editor is created without any config flags set, unlike the displayNames slot created from an initial (manual) “Set the Display Name” command.
Perform the following steps:
- In
Workbench, look at the slot sheet of components like the ones you wish to change config flags on their displayNames slot. Note which letters may appear in the Flags column for the displayNames slot.
Typical letters are r (Readonly), h (Hidden), o (Operator). For example rho means all of these config flags are set, whereas only h means just the Hidden flag is set. No letters means all config flags are cleared (removed).
- Access the Batch Editor (in the Nav tree, expand the Config, Services node and double-click ProgramService).
- Use the Find Objects function and/or drag and drop components with an existing displayNames slot that you wish to change a config flag. Note all components listed in the view will be changed in an identical manner.
- Click Edit Slot Flags to bring up the popup Edit Slot Flags dialog.
- In the Edit Slot Flags dialog:
- Leave the checkbox cleared for Set flags for object’s slot within its parent.
- In the Slot field select displayNames
- In the Flag field select the appropriate flag. For example, Readonly (to remove) or Hidden (to set).
- Click the Set Flag or Remove Flag control to select.
- Click OK to issue the command.
A BatchEditor Results popup replaces the Edit Slot Flags popup. It lists the results of the config flag batch edit.
- Click OK to close the results popup and return to the Batch Editor.
Example batch edit clearing of “Readonly” config flag on points
In this example, several points originally had action display names manually changed from their slot sheet. As a result, their
displayNames slot has config flags set for “Readonly”, “Hidden”, and “Operator” (rho). In order to use the Batch Editor to further edit display names for the slots of these points, the “Readonly” config flag
must be cleared (removed).
- The points are dragged into the Batch Editor and the Edit Slot Flags button is clicked.
In the Edit Slot Flags popup, displayNames is selected in the Slot field, and in Flag field the Readonly entry is selected. The Remove Flag control is selected.
- The OK button is clicked, and the Edit Slot Flags popup is replaced by the BatchEditor Results popup, showing the edit slot flag results.
In this example, the BatchEditor Results popup shows the batch edit removed the Readonly flag for all eight of the points in the Batch Editor.