Prerequisites:
The station must be running and opened in
Workbench, with the program module installed on the
Niagara host. The ProgramService should 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.
Typically, you add the displayNames slot to components without any display names already assigned. This adds the slot and assigns the display name value(s) in one operation. If a listed
component already has a displayNames slot, its value is typically overwritten by the new value in this task, unless you had first cleared the “Set if exists” checkbox.
NOTE: Any displayNames slot added by the Batch Editor is created without any config flags set. This varies from the displayNames slot created as a result of the manual Set the Display Name command (on component or from slot sheet).
Perform the following steps:
- In
Workbench with the station opened, 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 for which you want to add display names to child slots. Note all components listed
in the view will be changed in an identical manner.
- Click Add Slot to bring up the popup Add Slot dialog.
- In the Add Slot dialog, type displayNames in the New Name field.
- In the New Type field, ensure baja is selected on the left side, and click the right side drop-down control and select NameMap.
- For the checkbox Set if exists :
- Leave checked (the default) if components that already have a displayNames slot should have their current value overwritten with this new value.
- Clear (uncheck) if components that already have a displayNames slot should retain their current value. In this case, the Batch Editor does not alter such components.
- In the New Value field, type in the display name key-value pair(s) using the NameMap formatting {slotName1=displayValue;slotName2=displayValue;} (and so on).
NOTE: Ensure the value string includes the beginning and ending braces ({ and }), and that each slot key-value pair ends with a semi-colon (;)—even if only a single key-value pair. Also note that the slot name (key) portion is case-sensitive and so much match the
actual slot name; for example emergencyAuto instead of Emergency Auto.
- When finished in the Add Slot dialog, click OK.
A BatchEditor Results popup dialog replaces the Add Slot dialog. It lists the add slot results for each component listed in the Batch Editor (if the “Set if exists” option was set); otherwise it lists the results only for those components listed that were previously without a displayNames slot.
- Click OK to close the BatchEditor Results dialog and return to the Batch Editor view.
Example batch edit to add display names
In this example, numeric points named “OccCoolStpt” under the station’s
LonNetwork are given a
displayNames slot.
- The Find Objects function in the Batch Editor is used to find the target components.
- The Add Slot button is clicked, and the Add Slot popup dialog appears.
- In the New Name field, displayNames is entered.
NOTE: It must be entered exactly like this—plural.
NameMap is selected from the baja type drop-down list.
The checkbox Set if exists is left set.
- In the New Value field, the displayNames name map value is typed in.
In this case, the value is {override=Override Occ Cool Setpt;set=Change Occ Cool Stpt;auto=Release Occ Cool SP Override;}. Note the field editor does not stretch to display all of the text entered.
- The OK button is clicked in the Add Slot popup, which is replaced by the BatchEditor Results popup showing the edit slot results.
In this example with 6 components originally listed in the Batch Editor, 3 components have [SET] result and 3 have [ADD] result lines.
- [SET] indicates the component already had a displayNames slot. The new value overwrote the existing value.
- [ADD] indicates the component had no displayNames slot. The slot was added with the new value.