Edit the Naming Rule Script
Security Note: You need the Allow script maintenance and Allow the user to maintain naming script security right in the Scripting user group security rights group for this activity.
Activity Steps
- Open the Named Object Generator (script editor).
The Scripting Ribbon Tab displays.
- Edit the C# script. See Naming Rule Scripts.
- Append the public class code after any other public classes in the naming rule script.
- Ensure that script references are selected:
- Note the DLLs that are referenced in the script. The DLLs are listed at the top of the script, after the word "using".
- Select the References tab.
- Select the required DLLs.
- Click the Build icon on the Scripting ribbon tab to compile the script.
- Click the Save icon on the Scripting ribbon tab.
- To apply the naming rule script to the object:
- Open the Naming Rules.
- Locate and select the item to be changed.
- Check Use Script.
Whether to use script to manage the object name generation.
- Select the Script to be used.
Select from all naming scripts coded on the Named Object Generator (script editor) screen.
- If object names generated using this script are not to be edited, check Disallow Name Editing.
If checked, when a script is run, the name generated cannot be edited. The renaming of the object will be disabled on all screens (for example, via right-click rename, or click to edit). Any nodes with a Rename right-click option have that option removed when name editing is not allowed.
Example: If TruckDespatch has a naming script, when a truck despatch name is generated, if a rename is attempted for it on all screens, a warning is given that this cannot be done.
- Click Save.