HowTo

Arc shortcut keys

Arc is full of features to speed-up your developments, one of them is the use of shortcuts. This article contains the list of available shortcuts in Arc.

Menu

Windows/Linux Mac Description
Ctrl-M Command-M To hide/show the menu
Alt-M Option-M To go to the search

Rules and TI Editor

Debugging

Windows/Linux Mac Description
F5 F5 Continue
F10 F10 Step Over
F11 F11 Step in
Shift-F12 Option-F12 Step Out

Main Shortcut Keys

Windows/Linux Mac Description
Ctrl-X Command-X Cut
Ctrl-C Command-C Copy
Ctrl-P Command-P Paste
Ctrl-Space Command-Space Snippets
Ctrl-S Command-S Save
Ctrl-Shift-E Command-Option-E Execute

Line Operations

Windows/Linux Mac Description
Ctrl-D Command-D Remove line
Alt-Shift-Down Command-Option-Down Copy lines down
Alt-Shift-Up Command-Option-Up Copy lines up
Alt-Down Option-Down Move lines down
Alt-Up Option-Up Move lines up
Alt-Delete Option-Delete Remove to line end
Alt-Backspace Command-Backspace Remove to linestart
Ctrl-Backspace Option-Backspace, Ctrl-Option-Backspace Remove word left
Ctrl-Delete Command-Delete Remove word right
--- Ctrl-O Split line

Selections

Windows/Linux Mac Description
Ctrl-A Command-A Select all
Shift-Left Shift-Left Select left
Shift-Right Shift-Right Select right
Ctrl-Shift-Left Option-Shift-Left Select word left
Ctrl-Shift-Right Option-Shift-Right Select word right
Shift-Home Shift-Home Select line start
Shift-End Shift-End Select line end
Alt-Shift-Right Command-Shift-Right Select to line end
Alt-Shift-Left Command-Shift-Left Select to line start
Shift-Up Shift-Up Select up
Shift-Down Shift-Down Select down
Shift-PageUp Shift-PageUp Select page up
Shift-PageDown Shift-PageDown Select page down
Ctrl-Shift-Home Command-Shift-Up Select to start
Ctrl-Shift-End Command-Shift-Down Select to end
Ctrl-Shift-D Command-Shift-D Duplicate selection
Ctrl-Shift-P --- Select to matching bracket

Multicursor

Windows/Linux Mac Description
Ctrl-Alt-Up Command-Option-Up Add multi-cursor above
Ctrl-Alt-Down Command-Option-Down Add multi-cursor below
Ctrl-Alt-Right Command-Option-Right Add next occurrence to multi-selection
Ctrl-Alt-Left Command-Option-Left Add previous occurrence to multi-selection
Ctrl-Alt-Shift-Up Command-Option-Shift-Up Move multicursor from current line to the line above
Ctrl-Alt-Shift-Down Command-Option-Shift-Down Move multicursor from current line to the line below
Ctrl-Alt-Shift-Right Command-Option-Shift-Right Remove current occurrence from multi-selection and move to next
Ctrl-Alt-Shift-Left Command-Option-Shift-Left Remove current occurrence from multi-selection and move to previous
Ctrl-Shift-L Command-Shift-L Select all from multi-selection

Go To

Windows/Linux Mac Description
Left Left, Ctrl-B Go to left
Right Right, Ctrl-F Go to right
Ctrl-Left Option-Left Go to word left
Ctrl-Right Option-Right Go to word right
Up Up, Ctrl-P Go line up
Down Down, Ctrl-N Go line down
Alt-Left, Home Command-Left, Home, Ctrl-A Go to line start
Alt-Right, End Command-Right, End, Ctrl-E Go to line end
PageUp Option-PageUp Go to page up
PageDown Option-PageDown, Ctrl-V Go to page down
Ctrl-Home Command-Home, Command-Up Go to start
Ctrl-End Command-End, Command-Down Go to end
Ctrl-L Command-L Go to line
Ctrl-Down Command-Down Scroll line down
Ctrl-Up --- Scroll line up
Ctrl-P --- Go to matching bracket
--- Option-PageDown Scroll page down
--- Option-PageUp Scroll page up

Find/Replace

Windows/Linux Mac Description
Ctrl-F Command-F Find
Ctrl-H Command-Option-F Replace
Ctrl-K Command-G Find next
Ctrl-Shift-K Command-Shift-G Find previous

Other

Windows/Linux Mac Description
Tab Tab Indent
Shift-Tab Shift-Tab Outdent
Ctrl-Z Command-Z Undo
Ctrl-Shift-Z, Ctrl-Y Command-Shift-Z, Command-Y Redo
Ctrl-, Command-, Show the settings menu
Ctrl-/ Command-/ Toggle comment
Ctrl-T Ctrl-T Transpose letters
Ctrl-Enter Command-Enter Enter full screen
Ctrl-Shift-U Ctrl-Shift-U Change to lower case
Ctrl-U Ctrl-U Change to upper case
Insert Insert Overwrite
Ctrl-Shift-E Command-Shift-E Macros replay
Ctrl-Alt-E --- Macros recording
Delete --- Delete

Where to find support for Arc?

We would like to involve the TM1 community as much as possible into Arc developmets so we decided to put the Arc support public. The support for is public on our support platform https://support.cubewise.com/code/arc/issues.

From this repository, you can view all opened/closed tickets, submit new enhancements or report a bug:

All tickets are flagged with different labels which indicate the ticket status (planned, possible, closed...). To see all closed tickets, you just need to click on "Closed" just next to "Open".

How to create a ticket?

To submist an enhacement request, report a bug or just asking a question, you can open a new issue in cubewise-code/arc-issues.

1 - Create a new issue

To create a new issue, you will have to create a GitHub account (It is very quick and free). Once you are logged in to Github, you should be able to see the green New issue button on the top left

2 - Submit a new issue

You will then need to add the title and the content. To avoid back and force emails, you would need to add the following information:

  • Ticket title.

  • Arc and TM1/PA version number.

  • Desciption of the issue.

  • Steps to reproduce the issue.

Finally click on the Submit issue button, you will then receive an email once we replied to you.

Managing sessions timeout

To manage sessions timeout, Arc uses the HTTPSessionTimeoutMinutes parameter of the tm1s.cfg. This parameter sets the timeout authentication of TM1 REST API queries.

This parameter is defined per TM1 servers, the default value is 20 min.

To increase the timeout to 40 min for a specific instance, open the tm1s.cfg and add the new parameter HTTPSessionTimeoutMinutes=40. A server restarts is not necessary as this parameter is dynamic.

Building a new Hierarchy with a new process

In this article you will learn how to build a new Hierarchy based on attribute values.

We will be using Cubewise’s “Arc” IDE (Integrated Development Environment), but the concepts can be applied with any Hierarchy-aware TM1 editor e.g. the TI editor in PAW.

In this article you will learn how to build a new Hierarchy based on attribute values by building a new process with Arc.

We will focus on the Employee dimension.

This dimension has currently only one Hierarchy, Employee. All employees have a Department Code attribute:

Our objective is to create a new Hierarchy in the Employee dimension called Actual 2018 Department, which contains all employees with their current department value.

We’ll start by creating a new TI process. To create new process in Arc, just click on the New Process button on the top right:

Then type the new process name,in this example we’ll name it Dim.Employee.BuildHierarchy.Department

Click Create, and Arc will present a new tab with the process name ready for editing. Arc follows the “traditional” TI editor conventions in Architect, so in the Data Source tab, select:

  • Type: TM1DimensionSubset

  • Dimension: Employee

  • Subset: Default

Click Preview and then the Create Variables buttons. You’ll notice that Arc already prefix the variable with a “v” (variable prefixes can be configured in Arc’s settings.yml):

Let’s continue editing the TI process by defining the constants in the Prolog tab, in order to build the Employee Hierarchy we want to create:

  • cDimSrc: our dimension source which is also our target dimension.

  • cSubsetSrc: The subset source that we are going to loop through.

  • cAttr: The attribute we need to build the consolidation.

  • cHierarchy: Hierarchy name.

  • cTotalHierarchy: The top consolidation of our new Hierarchy.

Working with TI’s new Hierarchy functions

To work with Hierarchies in Turbo Integrator processes (TIs), IBM Planning Analytics introduced a lot of new functions. Thankfully all new functions to work with Hierarchies are very similar as the ones to work with dimensions. For Hierarchies, you will almost find a one to one match to dimensions operations such as HierarchyExists instead of DimensionExists (to check if a Hierarchy exists).

Cubewise Arc facilitates your learning TI’s new Hierarchy functions with built-in code snippets. To see the available code snippets, hit CTRL + SPACE and type “exists”.

Arc will show you all snippets that contain the search string – we’ll use the “HierarchyExists” snippet.

Prolog tab

Before we create a new Hierarchy, we should first verify if it already exists. If it doesn’t we can simply go ahead and create it. If it does, we must delete all of its elements so we can recreate it.

Next, we insert the a new “C” element to represent the apex, or “total”, of the Hierarchy:

We want our TI to loop through all employees (all leaf elements in the Employee dimension). To do that we need first to create a subset that contains only the leaf elements of the dimension and then define this subset as data source of this TI.

We’ll use the open-source Bedrock library to do this, specifically the Bedrock.Dim.Sub.Create.Leaf process, as follow:

When using Arc, you will develop much faster if you are leveraging the snippets:

Metadata tab

Now let’s continue to the Metadata tab. In this tab, we are going to create all of the parent-child relationships for our new Hierarchy, as follows:

  • Total Department

    • Department

      • Employee

We do this by inserting each new element using HierarchyElementInsert, then making them components of the parent-child path using HierarchyElementComponentAdd. Again, note these new Hierarchy commands, and the method we are using to build a roll-up, are nearly identical to the legacy “dimension” counterparts:

Eplig tab

In the process Epilog, we just need to delete the temporary subset, cSubsetSrc we created during the Prolog:

Save the process and then execute it.

Open the Employee dimension, if it was already open, refresh your web browser to get the last changes.

In the Hierarchy dropdown, you should be able to see the new Hierarch we just created:

We used the Department Code to create the consolidation, which is not very meaningful, so let’s now create a descriptive alias on this Hierarchy.

Populating attribute values

We need first to insert an alias into the Hierarchy. We’ll do this in the Prolog tab with the following lines of code:

#Create Alias for Hierarchy
cAlias = 'Employee and Department Name';
AttrInsert(cDimSrc | ':' | cHierarchy, '', cAlias, 'A');

To avoid duplicate alias when creating a new attribute on a Hierarchy only, you could use the new function ElementAttrInsert instead of AttrInsert so the syntax will look like this:

  • ElementAttrInsert(cDimSrc, cHierarchy, '', cAlias, 'A');

The ElementAttrInsert function will avoid duplicate alias on one consolidation which appears in two Hierarchies of the same dimension.

IIn the Data tab, we will now grab the alias for department from the Product Category attribute of the Department dimension and for the employee we use the attribute Full Name.

To add an attribute value to a consolidation which exists only in a specific Hierarchy, you need to “qualify” that Hierarchy in the ATTRPUTS function as follows:

  • AttrPutS(vDepartmentAlias, cDimSrc | ‘:’ | cHierarchy, vDepartment, cAlias)

Instead of

  • AttrPutS(vDepartmentAlias, cDimSrc, vDepartment, cAlias)

If the Hierarchy name is not specified in the ATTRPUTS function, the target element vDepartment will be the one in the default Hierarchy (Department).

To send the value to the vDepartment in our new Hierarchy (cHierarchy), we use cDimSrc | ‘:’ | cHierarchy instead of just cDimSrc.

It can be noted that instead of using AttrPutS, we could have used the new TI function ElementAttrPutS:

  • ElementAttrPutS(vDepartmentAlias, cDimSrc, cHierarchy, vDepartment, cAlias)

Save and Execute the process.

Open the Employee dimension, if you don’t see the alias just refresh your browser:

Where to share Arc plugins

A Arc plugin is a folder which contains as minimum, two files:

  • plugin.js: The plugin definition and the controller.
  • template.html: The look and feel of your plugin.

All plugins are stored in the plugins folder

  • :\Arc\plugins

Share your plugin with someone

To share your plugin, you just need to zip this folder and send it to someone.

Share your plugin on the Cubewise forum

To share your plugin with all the Arc community, you can upload your zip file or share your Github link on the Arc forum.

Share your plugins on Github

Github is a web platform where you can share your code publicly for free. Sharing your plugins on Github will enable the community to get the latest version of your plugin.

1 - Create a Github account

To be able to share your plugin on Github, you will need first to create an account. It's free if you agree to share your code publicly.

2 - Create a README.md file

The README.md file can be used to explain what your plugin does and how to use it:

An example of a README file can be found here.

Arc Plugins on Github

You can also find on Github all the latest Arc plugins by Cubewise CODE. Checkout the following repository:

Using the Arc subset editor

Like the cube viewer, the Arc subset editor is built to generate MDX set expressions. Most of the functionality should be familiar to what you have experienced in Architect or Perspectives: all elements, filtering, ordering, etc.

Create a new subset

The subsets are per hierarchies, the default hierarchy name is the dimension name. To create a new subset, from the menu list, open the dimension, then the hierarchy and click the [New Subset] button: 

Show only the first 10,000 elements

The subset editor will show by default only the first 10,000 elements but if you filter or search, it is going to filter or search on all elements of the dimension.

MDX record expression

There is no Record Expression option as the Arc subset editor is always recording the MDX expression. You can edit the MDX expression manually.

The Arc subset editor tests the MDX expressions by executing a query against the }ElementAttributes cube of the dimension. This means that any dimension that you want to use the subset editor against must have at least one attribute. Arc will prompt you to create one if it doesn’t exist.

Using the Arc cube viewer

Arc v0.9.5 introduces a new cube viewer to explore your cubes. The new cube viewer supports both native and MDX views.

Native view vs MDX view

A native view is the name of the standard view you have been used to using in TM1 for many years. These views do not support the new multiple hierarchies and are essentially deprecated. Arc supports reading native views but you cannot save a native view.

MDX views were added to TM1 to support multiple hierarchies, these views contain a single MDX statement. The Arc cube viewer is based on MDX, each time you drag/drop a hierarchy or select a set of elements the MDX is updated and executed against the TM1 model.

You can save MDX views with Arc, these views can be used in the newer TM1 interfaces such as PAX and PAW.

Open an existing cubeview

To open a cube view, look for the cube in the menu list, open the view list by clicking on the drill down button and then click on the view name you want to open:

Create a new cube view

To create a new view, just click the [New View] button under the cube name. You can then drag and drop the dimension you need in a title, row or column dimension. Click the execute button in yellow to refresh the view:

Default member of a dimension

You do not need to drag and drop all dimensions in the view to be able to see data. You just need at least one dimension on row and one on column. For all other dimensions which are not part of the view definition, Arc is going to use their default member. To learn how to define a default member for your dimensions, you should look at the following article:

Save view as a new MDX view

When saving a MDX view, Arc also saves the “view definition” as part of the view. If the MDX is updated outside of Arc (or Canvas), you will need to update / edit the MDX manually. Clear the MDX statement to revert to the drag/drop interface.

See the MDX

To access the MDX behind the view, just click the MDX button. Note that you cannot override manually the MDX. To update the MDX query, make some changes in the view and then click again to the MDX button to see the changes:

Set a default member for your dimensions

1 - Open }HierarchyProperties cube

To define a default member for a dimension you need to open the }HierarchyProperties cube, if you can't find the cube in the menu list, you should turn on the Show/Hide Control Objects setting:

2 - Add default member

Open a view of the }HierarchyProperties cube, to define a default member, you need to populate the defaultMember element of the }HierarchyProperties:

In the example above the default member for the Currency is Local. If the default member is not defined for a dimension, the default member will be either the top consolidation and if there is no consolidation, the default member will be the first element in the dimension.

3 - Update the MDX hierarchies without restarting TM1 server

After configuring or editing the named levels in the }HierarchyProperties control cube, use the RefreshMdxHierarchy function to update the MDX hierarchies in the TM1® server without requiring you to restart the server.

Create a new TM1 process and add RefreshMdxHierarchy(''); in the prologue and finally execute the process, it should take a few seconds.

More information about RefreshMDxHierarchy function, in this IBM article.

Create your own snippets

Arc helps you develop higher quality TM1/Planning Analytics applications faster. Arc is full of features which will save you lots of time, one of them is the snippets.

When you hit CTRL + Space in either a process or a rule, a dropdown appears which gives you access to:

  • All your variables defined in the TM1 process.
  • All your TM1 processes.
  • All TM1/Planning Analytics functions.
  • A lot of battle tested code (snippets).
snippets.gif

The list is constantly updated. If you create a new TM1 process, it will appear in the dropdown list, in the example below we add the new process Cub.SalesbyStore.LoadFromFile:

How to create your own snippets

It is very easy to add your own snippets. Create a folder called snippets in the Arc folder and then create a file processes.json.

The snippets file needs to be in JSON format, the value is what you see in auto complete and snippet is the content inserted. The placeholders are used to update blocks of code, example: ${1:condition}. If you want the code to be updated in multiple locations use the same placeholder number.

In the example below we added two new snippets with the name starting with MY so it will be easier to find them, but you can call them as you wish:

[
  {
      "value": "MYSNIPPET: If ELSEIf ELSE",
      "snippet": "IF(${1:condition});\n\t${2:consequent}\nELSEIf(${3:condition});\n\t${4:consequent}\nELSE;\n\t${5:alternative}\nENDIF;\n"
  },
  {
      "value": "MYSNIPPET: If...ELSE",
      "snippet": "IF(${1:condition});\n\t\nELSE;\n\t\nENDIF;\n"
  }
]

Once the processes.json has been updated, save the file and then refresh your browser but do not forget to clear the cache. Now if you hit CTRL + SPACE in a process and type snippet, you should have access to your new snippets:

How to create your plugins

If you do not know what is a plugin in Arc, you should read first this Help article:

Creating a Plugin

The easiest way to create a plugin is to copy an existing example and then update as required. The steps to do this are as follows:

  1. Copy the directory containing the plugin. For example, Arc\plugins\bedrock-cube-clone.
  2. Edit the plugin.js file updating the name of the plugin so it is unique. A good idea is to use your name or domain as a prefix to your plugins. The name must be updated in two locations, in the definition and on the service/directive (see below).
  3. Update the rest of the plugin information and refresh the page.

The README file in the plugins directory contains a description of each of settings you can update when defining a plugin:

There are 4 arguments to pass through to the plugin function:
    name:   The name to use for the plugin, this must be unique or an error will occur.
            Use your name or domain as a prefix to make it unique
    label:  The label is what you will see in the menu 
    type:   The type of plugin, options are: page, menu/dimension, menu/cube, menu/process, menu/chore
    options: Extra (optional) options for the plugin as an object:
        icon:           A font-awesome class for the icon you want to display
        instanceName:   Restrict the plugin to a particular TM1 instance
        objectName:     Restrict the plugin to a particular TM1 object
        description:    A description of what the plugin does
        menu:           A parent menu to add the plugin to: dimensions, cubes, processes, chores, administration, tools
        version:        The version of the plugin
        author:         Your name
        url:            A URL that people can use to find out more details about the plugin

After defining a plugin you must create either a service (for menu plugins) or directive (for pages)
The service/directive name must match the plugin name used above
Menu plugins MUST implement one interface execute(instance, name)

Executing a TI Process from a Plugin

One of the easiest things to add to a plugin is executing a process or chore. You can see some examples of this in all of the menu plugins: bedrock-cube-clone, bedrock-dimension-clone, general-ledger-load and process-execute

Before you can execute a process or chore you need to include the $tm1 service in your plugin, if you have copied an existing plugin it will already be there.

The $tm1 service has following parameters to call a process and chore:

  • $tm1.processExecute(instanceName, processName, parameters)
  • $tm1.choreExecute(instanceName, processName)

If you pass 2 parameters to processExecute leaving the parameters blank Arc will retrieve the list of parameters and present the user with a dialog box for input.

If you want to execute the process directly without user input you should pass through the parameters:

$tm1.processExecute(instance, "Bedrock.Dim.Clone", [
    {
        Name: "pSourceDim",
        Value: name
    },{
        Name: "pTargetDim",
        Value: newName
    }
]).then(function(result){
    if(result.success){
        // It has finished with success
        $rootScope.reloadInstance(instance);
    }
});

Both processExecute and choreExecute return a promise (then function) that can be used to update the UI after the process is complete. If the process you are running is add or deleting objects your can refresh the menu on completion using $rootScope.reloadInstance(instance); See above example.

How Plugins work

What is a plugin?

A plugin is a functionality that you can add to Arc. Arc comes with a few plugins, you can see the full list in Arc/plugins folder:

There are two types of plugins in Arc: pages and menu items.

Page Plugin

A page plugin can be used to building nearly anything you want, it has full access to the REST API and is only limited by your imagination. It is created by building an Angular directive, you really don’t need to know much about this, start by copying an existing plugin. All page plugins will apear under Tools in the left bar menu:

The pages you create can be used either for all TM1 instances or can be designed for a specific application. Some examples of what you can build are:

  • Manage security
  • Retrieve and update security
  • REST API explorer
  • Administration page with links to important TI or processes that you run each month.
  • Bedrock admin page with descriptions of TI easy execution.
  • Apliqode admin pages to provide a custom UI to all of the cool stuff in Apliqode.

Menu Plugin

The menu plugins appear as a sub item on the menu. The menu plugins can be configured to appear by object type, instance and/or object name. It can be used to customise the Arc interface so it is quick and easy to do your common day to day tasks. If you are doing things each day or month consider building a plugin.

For example, a plugin already exists Bedrock Clone which is going to run the Bedrock.Clone process for the specific dimension:

There are lots of things you could use the plugin for such as:

  • Add a sub menu to each process to execute it.
  • Add a sub menu to clone an object.
  • Add a sub menu to rename objects.
  • Add a sub menu to delete objects.
  • Add all of the related load processes for a cube as a sub menu. (see, general-ledger-load plugin).

The important part of the menu plugin is the function this.execute(instance, name), each menu plugin must contain this function. It is executed when you click on the menu item and passes through to the plugin the name of TM1 instance and the name of the TM1 object.

For example if you open the C:\Arc\plugins\bedrock-dimension-clone\plugin.js file, you can see that the this.execute command run the process Bedrock.Dim.Clone process:

How Plugins are loaded

The plugins are loaded from the plugin directory in the same location as Arc. The plugins are processed in the following way:

  1. The Arc application is loaded in the browser or refreshed.
  2. Any plugin.js files in the plugins directory and its sub-directories are combined and loaded with the Arc application. You can disable loading of a particular plugin via the plugins.yml in the plugins directory.
  3. Calling $rootScope.plugin function adds the plugin to Arc.
  4. The directive or service is added to Arc app.
  5. For page plugins they are added to the menu, menu items are added as a sub menu based on the criteria in the plugin.

Plugins are loaded from file each time you refresh your browser so development is easy, change the file, refresh the page and see if it works. You can also use your favourite browser developer tools to debug your plugin in the browser, in Chrome press F12 and go to the Sources tab, there you will see the plugins file by expanding the _ folder. The plugins fileis named plugins_{version}.js

Define templates for new TM1 objects

Create a new TM1 process

There are different ways to create a new TM1 process using Arc, you can either choose to clone an existing process or create a new blank process by using the create process button in the top right corner:

Type the name of the new TM1 process and click the create button:

By default, Arc will create the new TM1 process with the same default lines as TM1 does:

Update the templates

The template that Arc uses to create a new process is defined in the following file:

  • Arc\templates\process\blank.json

This file is on a JSON format and it will contain the structure of the new TM1 process, if you haven't updated this file, it will look like this.

You can see the four main tabs (Prologue, Metadata, Data and Epilogue) all start with the same two lines (\r\n means go to the next line):

"PrologProcedure": "#****Begin: Generated Statements***\r\n#****End: Generated Statements****",

Inside the double quotes, you can add new lines. For example we want to jump one line (\r\n), add a new line where we can add the Process Name (\r\n#Process Name:) and an other line where we can add the Date (\r\n#Date :):

\r\n\r\n#Process Name:\r\n#Date

By adding the text above to the Prologue line, your file should look like this:

After saving the file, if you create now a new process, you will see in the prologue tab, two new rows:

Update dimension and chore templates

In the Arc folder, you will find the templates for dimension and chore:

Debugging a TM1 process

What is debugging?

Debugging code allows you to step through line-by-line and see what the values of the variables are as you go. No need to write out to ASCII files with what is going on in TM1 process anymore.

Enable debugging

To enable debugging you need to add the following parameter to the tm1s.cfg file and then restart the TM1 instance: 

  • EnableTIDebugging=true

Run a process in debug mode

To debug a process click on the  button on the open process:

Once debugging has been initiated it will stop on the first line in the Prolog. To navigate through the code use the Continue, Step Over, Step In and Step Out buttons:

  • Continue: Run code until the end of the process or a breakpoint.

  • Step In: Moves line to line and will also enter a child process called by the ExecuteProcess function.

  • Step Over: Works the same as Step In by moving line to line except it DOESN’T enter a child process called by ExecuteProcess.

  • Step Out: Continues until the end of the child process and then stops at the next line in the calling process. This should be used with Step In to exit a child process called via ExecuteProcess.

Breakpoints allow you to stop the execution of code at a particular point, currently Arc supports line based breakpoints. To add one click on the left hand side of the line number in the code editor. This will create a new simple breakpoint that will stop the code each time you debug.

Add a condition to a breakpoint

You can add a conditional expression to the breakpoint to make it stop only when a variable is a certain value. To do this click on the Breakpoints tab and enter the expression as below:

You can also use the Breakpoints tab to enable/disable breakpoints while you are running the process.

While debugging, you can hover a variable to see the value:

On the right pane, you can filter the list of variables to focus only on the variables you are interested on:

debugging.png

Watch the video:

Happy debugging!!

Generate code automatically with snippets

A snippet is a bloc of code which can be automatically generated. To add a snippet, just press Ctrl+Space in one of the TM1 process tab, and then type snippet or the name if you know what it is.

In this example we choose the snippets: "While loop through dimension":

Once the snippet has been inserted use the tab key to navigate to each placeholder to update the values. When one placeholder is used in multiple locations in the code, you just need to overwrite one location and all the other locations will be updated automatically:

How to logging into a TM1 instance

You should be able to see all TM1 instances available on the server where Arc is running.

To connect to a TM1 instance, just click on the name and a login window will appear:

Once logged in you can ask Arc to remember your TM1 credentials, so you don’t have to enter your password. Click on the About/Info icon on the top-right of the Arc page and check the Store Credentials option.