Changing the Naming of Functions and Snippets in Rules and Processes
Changing the Naming of Functions and Snippets in Rules and Processes
By default, all TM1 functions and snippets in the Arc Rules and Process editors follow PascalCase naming. From Arc v1.11, you can customise the case and naming style using built-in scripts or your own custom script.
How Auto-Complete Naming Works
When editing a rule or TI process in Arc, pressing CTRL + SPACE opens the auto-complete list of functions and snippets. The naming convention applied to these entries is controlled by the rulenamingscript and processnamingscript settings in settings.yml.
Built-In Naming Scripts
Arc ships with two built-in scripts located in the Arc/naming folder:
Script | Effect |
|---|---|
| All functions and snippets displayed in lowercase |
| All functions and snippets displayed in UPPERCASE |
Note: These built-in files are overwritten each time Arc loads and cannot be edited directly. To customise naming, create your own script (see below).
Configuration
Open settings.yml and add the relevant parameters:
# Apply a naming script to the Rules editor
rulenamingscript: naming/uppercase.js
# Apply a naming script to the Process (TI) editor
processnamingscript: naming/uppercase.jsAfter saving, clear the browser cache (SHIFT + F5) and refresh Arc — the new naming style will take effect in the auto-complete lists.
Creating a Custom Naming Script
To apply your own naming convention:
Copy one of the existing scripts (
lowercase.jsoruppercase.js) from theArc/namingfolder.Save it with a new name (e.g.
Arc/naming/myconvention.js).Modify the script logic as required.
Update
settings.ymlto point to your new script:
rulenamingscript: naming/myconvention.js
processnamingscript: naming/myconvention.jsClear the browser cache (
SHIFT + F5) and refresh Arc.