Format Code Settings in Arc

Format Code Settings in Arc

Format Code Settings in Arc

From Arc v3.4, the Arc Process and Rules editors include a powerful Code Formatter that automatically applies formatting rules to your TI code — making it easier to read, understand, and maintain.


Why Use Code Formatting?

Consistent code formatting benefits the entire team:

  • Code is easier to read and faster to understand.

  • It improves consistency across all developers.

  • It makes your work look professional and audit-ready.

  • Coming back to code months later is less frustrating.


How to Format Code

Click the Format Code button in the Process or Rules editor toolbar to apply the current formatting rules to the open script.


Customising Formatting Rules

Arc ships with predefined formatting rules, but they are fully customisable:

  1. Click the settings dropdown in the formatter options.

  2. Enable or disable individual rules using the tick boxes.

  3. Disable all rules at once by unchecking the first box.

  4. Reset all rules to defaults by clicking the cross (×) in the top-right corner.


Available Formatting Rules

Rule

Description

Rule

Description

Change Keyword Case

Change the case of TM1 keywords (upper, lower, camelCase, etc.)

Format Function Calls

Add padding around function names, parentheses, and commas

Format If Blocks

Indent and add line breaks in IF/ELSEIF/ELSE/ENDIF blocks

Format While Blocks

Indent code inside WHILE/END blocks

Add Breaks to Comment Blocks

Add line breaks to separate comments; use ## to force a manual break

Pad Symbols

Add padding around specified symbols (e.g. =, |)

New Line After Semicolon

Add a carriage return at the end of each statement

New Line After Comment Line

Add a carriage return after comment lines

Limit Number of Line Breaks

Cap the number of consecutive blank lines


Editing a Rule

Click the gear icon on any rule to open its edit dialog and customise its behaviour. Hover over the icon to see a description of the rule.


Sharing Formatting Rules with Your Team

Formatting rules are stored in the browser cache. To share rules across the team:

  1. Click the Export button (top-right of the formatter).

  2. Send the exported file to colleagues.

  3. They import it using the Import button.


Available In

  • Process Editor (all tabs)

  • Rules Editor


Related Pages