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 Arc is now on the public web platform Github under the Cubewise CODE repository cubewise-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.

Trialling and Buying Arc

IMPORTANT: To trial, buy or update licenses the browser hosting the Arc user interface needs to be able to access the internet. If you are accessing Arc on a server it is possible that you will not be able to connect to the internet, if you have issues connecting try using your desktop computer instead.

1. Download Arc

To purchase Arc, you will need first to download it. The latest version of Arc will always be available on the Arc download page:

2. Start Arc

Once downloaded, unzip the folder and copy arc.exe file into the folder where you want to install Arc. In this example we copy Arc to C:\Arc folder:

To start Arc, just double click on the arc.exe.

Arc can be installed as a Windows service by following the steps described in this article:

3. Start Trial

Once started you can access Arc using the URL http://localhost:7070 if you are on the server or http://ServerName:7070 to access it from your desktop (replace ServerName with the name of your server):

NOTE: Arc will show the available TM1 instances only after starting a trial or purchasing Arc.

You will need to choose if you are an organization or an individual and you will then have to agree to the terms and conditions by clicking Agree and Start Trial:

You should now be able to see your TM1 instance on the left hand side:

arc-license7.png

4. Buy Now button

Once the trial period has expired to continue using Arc you will have to purchase a subscription by clicking to the Buy Now button:

Step 1: Choose between Organization and Individual

The first step in the purchase process is to select if you are an organization or an individual/contractor/consultant:

Step 2: Choose the subscription type

If you selected an organization, you will be able to choose between a monthly or yearly fee. Only the Monthly option is available to an individual:

Step 3: Agree to the license agreement

The third step is to agree to the license terms by clicking Agree to Terms:

Step 4 of 5: Customer Details

The fourth step is to enter your email. This is the email which will receive al information about the subscription.

If you have selected an organization, you will be able to choose how many users you want to purchase. You need to buy a user for each TM1 developer/administrator that will be accessing Arc. You can change the number of users after you purchase Arc.

Step 5 of 5: Payment Method

In the last step, you can either enter the credit card detail to the card which will be charged every month or year depending on your subscription or choose the offline payment option. When using a credit card you will be sent a notification 3 days before the subscription is renew so you can cancel if required.

NOTE: Credit card is the preferred payment method, it will allow you to use Arc immediately.

If you choose the Offline Payment option, an invoice with payment details will be sent to the email entered in the contact details.

NOTE: Your subscription starts immediately, licenses will ONLY be able to be generated when we can verify payment has been made.

After clicking on the Start Yearly button, you will then receive an email with information about your Customer ID:

Request License from Existing Account

To request a license, you can use either the customer ID received by email or enter the email used to buy the subscription:

After clicking the request license button, an email will be sent to the email used to purchase the subscription with the License ID, copy the License ID in the Validate License tab to validate the license:

If the Buy Now button disappears, it means that your license is now active:

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:

Randomise your data in an instant

Why would you need to obfuscate/scramble your data?

The most common reason why you would need to obfuscate/scramble your data is if you need to send your data to third parties. One way to do it, is to randomize the values. The metadata (cubes, dimensions and elements names) will still be intact but the data will be randomised.
You could do it manually by doing a proportional spread but it could be time consuming if you are working on large cubes. A new way to randomise your data is now available with Arc and the randomisator plugin.

How does it work?

In just three quick steps, you will be able to randomise data for any cubes:

  1. Select the cubes you want to randomise.
  2. Select the target folder where the new .cub files will be created.
  3. Click Randomise button.

The plugin will create new .cub files in the target folder with random data. Therefore, there is no risk to mess-up your actual data as this plugin will create new .cub files.

See it in action!

Where to find it?

The randomisator plugin is not part of the default plugins when you install Arc. However it is part of the samples plugins which you can find on the cubewise-code/arc-plugins-samples github page.

How to set-it up?

To add one of these plugin to your Arc installation, you just need to download the folder from GitHub:

Paste it in your Arc/plugins installation folder:

Then refresh your browser and clear the cache. You should now be able to see it under Tools:

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:

Execute TM1 REST API queries

The TM1 REST API plugin will help you to get more familiar with the TM1 REST API. You can execute pre-written GET, POST, PATCH and DELETE request or write your own requests.

The plugin will then show the JSON response that the TM1 REST API sends back:

Add this plugin to your environment

  1. Download the folder.
  2. Paste the folder insite your plugins folder (Arc\plugins).
  3. After clearing the cache you should now see the plugin.

Connecting to the IBM Cloud remotely with Arc

As it is explained in this article Using Arc on the IBM Cloud with Security Mode 5 you can use Arc with the IBM Cloud by uploading Arc to the Remote Desktop System. In this article, we explain how you can use Arc from your laptop/desktop and connect remotely to the IBM Cloud via the REST API.

The key to connecting to the REST API is to have the correct URL for your TM1 instance, then added it to the settings.yml file like so:

REST API URL

The REST API that you need to use look like this:

https://CUSTOMER-NAME.planning-analytics.ibmcloud.com/tm1/api/INSTANCE-NAME

or

https://SERVER-NAME/tm1/api/INSTANCE-NAME.

You need to replace CUSTOMER-NAME with your IBM Cloud name and INSTANCE-NAME with the name of the TM1 instance you want to connect to. NOTE: The URL is case-sensitive, CUSTOMER-NAME is normally lower-case.

Credentials

As discussed in this article Using Arc on the IBM Cloud with Security Mode 5 you need to use your TM1 automation credentials unless you change to security mode 1.

Using Arc on the IBM Cloud

This article describe the steps to use Arc with the IBM Cloud from the Remote Desktop System they provide. The instructions are based on using TM1 security mode 5 (the default):

Setting up Arc on the Remote Desktop System

  1. Upload the Arc executable to your Remote Desktop System. The easiest way to do this is to use FTP upload facility.
  2. Create a folder named Arc in your Documents
  3. Save arc.exe to Documents\Arc.
  4. Double-click on the Arc executable to start the Arc server.
  5. Open settings.yml in Wordpad and change the admin host from https://localhost:5898 to https://data:5898
  6. Save settings.yml

Login into TM1 in Arc with TM1 Automation Credentials

  1. Navigate to the http://localhost:7070
  2. Go to the About page of Arc (top right icon) and tick TM1 Credentials > Store Credentials.
  3. Click on your TM1 instance to login, you need to use the TM1 automation credentials provided in your welcome pack:
    • CAM Namespace: LDAP
    • User Name: customername_tm1_automation
    • Password: password provided by IBM

Give the TM1 Automation Account Admin Access

After you have logged in you will need to add the TM1 automation user to the Admin group if it hasn’t been added already. To do this:

  1. Login in to Architect with your IBM Id
  2. Right-click on the server: Security > Clients/Groups
  3. Find the TM1 automation user and tick the Admin group box.
  4. Close the browser and log back into Arc.

NOTE: The alternative to using the TM1 automation credentials is to change TM1 to security mode 1

How to overwrite the snippets/functions

The following article will explain you how to customize the existing list of snippets. Instead of trying to customize the snippets, it is much easier to create your own.

To customize the snippets, you need to follow these steps:

  1. Get the snippets from Arc using Chrome.
  2. Create the new snippets files.
  3. Paste all snippets into these files.
  4. Overwrite the snippets.

1 - Get the list of snippets

The next step is to get the list of snippets and to paste it into our new files. To get the list of snippets, first open a TM1 process in Arc and then open the Developer toolbox of Chrome (F12) and follow these steps:

  1. Go to the Network folder which will show all the files loaded by Arc.
  2. You will need to filter the files with "snippets" if you want to get the snippets contents or "functions" if you are looking for TM1 functions.
  3. Click on processes or rules (if the files do not appear, refresh the browser)
  4. Go to the Response tab
  5. Copy the content

2 - Create the snippets file

The snippets are stored in four different files:

  • public/snippets/processes.json: list of snippets for processes.
  • public/snippets/rules.json: list of snippets for rules.
  • public/functions/processes.json: list of TM1 functions for processes.
  • public/functions/rules.json: list of TM1 functions for rules.

To overwrite the snippets, you will need to create these files in your Arc folder

WARNING: Once these files are in your Arc folder, Arc will start using these files instead of the internal files. It means that if one of these files is blank, you won't be able to see the corresponding snippets in Arc. That is why you should first get the content using Chrome, create the files, paste the content in these files and finally overwrite these files.

You don't have to create the four files, if you just want to overwritte the snippets for the TM1 processes, you should just create public/snippets/processes.json file.

    3 - Paste the content into the file

    Paste the content in the relevant file, in our example we paste the content in public/snippets/processes.json

    The content is in a JSON format, you can ask Notepad++ to format this file if you have the right plugins installed:

    4 - Overwrite the file

    Now you start overwritting this file. If you are planning to replace the lowercase into uppercase, replacing the all file will not work, you will have to replace only the specific word one by one because few key words have to stay lower case:

    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.