<img src="https://trc.taboola.com/1278851/log/3/unip?en=page_view" width="0" height="0" style="display:none">

Blog

Automation in TM1 using AutoHotkey

[fa icon="calendar"] March 2, 2020 / by Rajan Bajracharya

Rajan Bajracharya

This blog explains a few TM1 tasks which can be automated using AutoHotKey. For those who don't already know, AutoHotKey is open-source scripting language used for automation.

1. Run TM1 Process history from TM1 Serverlog :

With the help of AutoHotKey, we can read each line of a text file by using loop function and content is stored automatically in an in-built variable of function. We can also read filenames inside a folder using same function and again filenames will be stored in an in-built variable. Therefore, by making use of this we can extract Tm1 process information from Tm1 Serverlog and display the extracted information in a GUI. Let’s go through the output of an AutoHotKey script which gives details of process run.1. 

  • Below is the Screenshot of output when script is executed. Here we need to give log folder and data folder a path.

    Picture1-23
  • After giving the details and clicking OK, list of processes in the data folder of Server is displayed in GUI.

    Picture2-8

    Picture3-5
  • Once list of processes are displayed, double-click on process to get process run history. In below screenshot we can see Status, Date, Time, Average Time of process, error message and username who has executed the process. Thereby showing TM1 process history in TM1 server log. 

    Picture4-4

 

2. Opening TM1Top after updating tm1top.ini file and killing a process thread

With the help of same loop function which we had used earlier, we can read tm1top.ini file and update it using fileappend function in AutoHotKey. Let’s again go through the output of an AutoHotKey script which will open Tm1top.

  • When script is executed, below screen comes up which will ask whether to update adminhost parameter of tm1top.ini file or not.

    Picture7-3
  • Clicking “Yes”, new screen comes up where new adminhost is required to be entered.

    Picture8-4
  • After entering value, new screen will ask whether to update servername parameter of tm1top.ini file or not.

    Picture7-3
  • Clicking “Yes”, new screen comes up where new servername is required to be entered.

    Picture8-4
  • After entering a value, Tm1Top is displayed. For verifying access, username and password is required

    Picture10-2
  • Once access is verified, just enter the thread id which needs to be cancelled or killed.

    Picture11-4

 

Topics: PlanningAnalytics, How to, TM1 How To, TM1 hidden feature, TM1 Support, PA Local, TM1 Local, PA Cloud, Financial Planning, Financial Planning Software, Business Intelligence Applications, IBM Planing Analytics

Rajan Bajracharya

Written by Rajan Bajracharya

Subscribe to Email Updates

Recent Posts