Semi-BatchEditing for Niagara AX/4 system component displayNames.

Semi-BatchEditing for Niagara AX/4 system component displayNames.
Note:(This document does not cover the process to BatchEditing component (names), as that is another document(Robot Editing Niagara AX/4 component names.))
 
 
Slots:
One of the first steps in localization, is to provide locale specific slot names. Every slot has a programmatic name and a context sensitive display name. The process for deriving the display name for a slot:
BComplex.getDisplayName(Slot, Context): The first step is to call this API. You may override this method to provide your own implementation for localization.
NameMap: The framework looks for a slot called "displayNames" that stores a BNameMap. If a NameMap is found and it contains an entry for the slot, that is used for the display name. Note the NameMap value is evaluated as a BFormat, so it may contain a lexicon call. NameMaps are useful ways to localize specific slots, localize instances, or to localize dynamic slots.
Lexicon: Next the framework attempts to find the display name for a slot using the lexicon. The lexicon module is based on the slot's declaring type and the key is the slot name itself.
Slot Default: If we still haven't found a display name, then we use a fallback mechanism. If the slot is frozen, the display name is the result of TextUtil.toFriendly(name). If the slot is dynamic the display name is the result of SlotPath.unescape(name).z
1. Go to the slot sheet of a control point on which you have already edited display names for actions, etc, like you want.
2. On its slot sheet, right-click that displayNames slot, then select Config Flags.
3. In the popup Config Flags dialog, uncheck (clear) Hidden.  Now this slot appears on the property sheet.
4. Now go to the point's property sheet.
5. Observe the displayNames value.
Say, if the *only* display names you changed were for a BooleanWritable's two actions "Active" and "Inactive" to "On" and "Off", the now-visible displayNames property would have a value: {inactive=Off;active=On;}.  Or for your second example, say for a NumericWritable, its displayNames property would have a value: {set=Adjust set point;auto=Control;}



CAUTION:
Before trying things in a station's Batch Editor, make sure to *Save* that station's database--as there is no "undo", and some behaviors in that view seem a little "non-standard" perhaps. For example, when you issue a command in the Batch Editor, every item (row) in that view is acted upon, and not just those items/rows you may have selected/highlighted. It is easy to forget stuff like that.

Also, note that starting in AX-3.6 you can edit a Config Flag of components in the Batch Editor, and a tech doc about using the Batch Editor came out around then. If you have AX-3.6 or later and installed docs/PDFs, find it as !\docs\EngNotes\BatchEditor\docEn_BatchEditor.pdf or in WB Help at url module://docEngNotes/doc/docEN_BatchEditor.html
 
Using batch editor?
Click "Add Slot"
New Name:
"displayNames"
New Type: baja : NameMap
Value: "{frozenPropName=New Display Name;otherFrozenPropName=Other Display Name;}"


For examples on what the value should look like, rename a few slots using the slot sheet method, then un-hide the new "displayNames" slot and view it in the property sheet.
 
Query for the Parent Folder that contains the various components you wish to efficiently add displayNames to.
 
 
Examples of the (key=”valuePairs”;)
{SUPPLYAIRTEMP=Supply Air Temperature;RTU_SCHEDULE=RTU 9 Schedule;DEHUMID1MODE=Dehumidification Mode 1;CurrentControllerOSA_RH=Outside Relative Humidity;MANOCCOVERRIDE=Manual Occupancy Override;OccupiedStatus=Occupancy Status;COMP1SS=Compressor1 Start/Stop;OperatingSetpt=Operating Setpoint;COMP2SS=Compressor2 Start/Stop;EconomizerOperation=Economizer Operation;SPACEHUMIDITY=Space Humidity;HEAT1SS=Heat 1 Start/Stop;SCHEDULE=Schedule Command;HEAT2SS=Heat 2 Start/Stop;ECONODAMPER=Economizer Damper Position;HEATINGMODE=Heating Mode;UNOCCHEATSP=Unoccupied Heat Setpoint;OCCHEATSP=Occupied Heat Setpoint;FANSS=Fan Start/Stop;EmergencyShutdown=Emergency Shutdown;MINOSADPRPOS=Minimum Outside Air Damper Position;UNOCCCOOLSP=Unoccupied Cool Setpoint;ENERGYSAVINGSMODE=Energy Savings Mode;RETURNAIRTEMP=Return Air Temperature;SPACETEMP=Space Temperature;UNOCCHumiditySP=Unoccupied Humidity Setpoint;OCCCOOLSP=Occupied Cool Setpoint;CurrentControllerOSATemp=Outside Air Temperature;COOLINGMODE=Cooling Mode;OCCHumiditySP=Occupied Humidity Setpoint;COMP1SIGNAL=Compressor 1 Signal;DigitalCompAlarm=Digital Compressor Alarm;HighCO2Over$5fDisStatus=High CO2 Status;DEHUMID2MODE=Dehumidification Mode 2;}
 
Continued - Examples of the (key=”valuePairs”;)
{OCCHEATSP=Occupied Heat Setpoint;OCCCOOLSP=Occupied Cool Setpoint;UNOCCHEATSP=Unoccupied Heat Setpoint;UNOCCCOOLSP=Unoccupied Cool Setpoint;RTU_SCHEDULE=RTU 9 Schedule;}

Add Feedback