Generate Code Automatically with Snippets
Generate Code Automatically with Snippets
Arc's snippet system lets you insert battle-tested blocks of TM1 code in seconds using the auto-complete menu — no need to write repetitive code from memory.
How to Use Snippets
Open a TI process or rule in Arc.
In any process tab (Prolog, Metadata, Data, or Epilog), press CTRL+SPACE to open the auto-complete panel.
Type part of the snippet name to filter the list (e.g. type
whileto see loop snippets).Select the snippet — the code block is inserted at your cursor position.
What Appears in the Auto-Complete Panel
When you press CTRL+SPACE, Arc shows:
Item Type | Description |
|---|---|
Variables | All variables defined in the current TI process |
Processes | All TM1 processes from connected instances |
TM1 Functions | All TM1/Planning Analytics built-in functions |
Snippets | Pre-written code blocks for common patterns |
Navigating Snippet Placeholders
After inserting a snippet, use the Tab key to jump between placeholders in the code. Placeholders appear as highlighted text (e.g. ${1:dimensionName}).
Linked placeholders: If the same placeholder appears in multiple locations (e.g. a dimension name used in several functions), updating one occurrence automatically updates all others.
Example: "While Loop Through Dimension"
Press
CTRL+SPACEand typewhileSelect While loop through dimension
The loop structure is inserted. Press
TABto move to each placeholder and fill in the dimension name, subset name, etc.
Built-In Snippet Library
Arc ships with a large library of pre-built snippets covering:
Loop patterns (while loops, element iterations)
Hierarchy functions (
HierarchyExists,HierarchyCreate, etc.)Bedrock process calls
Error handling patterns
Cell manipulation (CELLGET, CELLPUT, DB functions)