TM1EasyAPIX Object Model for TM1 API

Advertisements, add-ons and other commercial information
Post Reply
User avatar
paulsimon
MVP
Posts: 808
Joined: Sat Sep 03, 2011 11:10 pm
OLAP Product: TM1
Version: PA 2.0.5
Excel Version: 2016
Contact:

TM1EasyAPIX Object Model for TM1 API

Post by paulsimon »

The TM1EasyAPIX is an Object Model for the raw TM1 API, that makes using the API far easier, and much more like using the Excel Object Model.

Unlike previous versions of the TM1EasyAPI this version is written in pure Excel VBA and therefore requires no installation, and no assistance from the IT Dept to package software, etc.

The TM1EasyAPIX is aimed at users who are familiar with writing VBA Macros in Excel, but who don't have the time to get to grips with API coding. In our experience most TM1 users are Finance people and most Finance Departments have at least one or two people who have written lots of VBA Macros to automate monthly downloads and reporting, etc. These are exactly the sort of people at which the TM1EasyAPIX is aimed.

We don't know if you have already tried getting to grips with the TM1 API. If so, you may have found that it is not that easy. You would need to get to grips with concepts such as Handles and Pool Memory Management. All this gets in the way of what you really want to do, for example, to tie together some VB code to automate a download from your General Ledger, with some VB Code to run a Turbo Integrator script to load the data in to TM1.

Our aim in developing the TM1EasyAPIX was to make dealing with the TM1 API a lot more like dealing with the Excel Object Model.

Eg in Excel, you can write statements like:

Dim X as Variant
X = Sheet("Qtr1").Range("Profit").Value
Sheet("Qtr1").Range("Profit").Value = X * 5

Using the TM1EasyAPIX, you can write statements like:

Dim oTM1SC as TM1OServerConnection
Dim oTM1Client as TM1OClient

For Each oTM1Client In oTM1SC.Clients.ListCanRead
' Print the name of the TM1 Client
Debug.Print oTM1Client.Name
'See if member of Admin Group
Debug.Print oTM1Client.IsMember("Admin")
Next

In Excel, once you put a dot '.' after an Object, you get a list of all properties and methods that are available to work with that Object. For example, if you put a ‘.’ after a Range Object, eg ‘Range(“A1:A3”).’, you will see a list of properties of the Range Object, including the Cells Property. The Cells Property gives you access to the Cells in the Range. With the TM1EasyAPIX, once you put a ‘.’ after, eg, a TM1ServerConnection Object, you get a list of the methods and properties that are relevant to a TM1ServerConnection, eg Cubes, Dimensions, etc. You will find that the default property is the Item property. So you can write oTM1SC.Cubes.Item("ProfitCube") or just oTM1SC.Cubes("ProfitCube") - where the variable oTM1SC is a TM1 Server Connection Object.

The TM1EasyAPIX is loaded as a normal Excel Spreadsheet. To connect to TM1 you can enter the name of the TM1 Server into the TM1EasyAPIX Spreadsheet. You can then enter the TM1 User Id and Password. However, most users prefer to select the option to piggyback an existing connection to TM1 made using the TM1 Excel Add In. You can also connect to a TM1 Server via VBA macro programming statements

For further information, visit: http://www.successcubed.co.uk where you can and to download the TM1EasyAPIX and demonstration files via the Products tab.
User avatar
paulsimon
MVP
Posts: 808
Joined: Sat Sep 03, 2011 11:10 pm
OLAP Product: TM1
Version: PA 2.0.5
Excel Version: 2016
Contact:

Re: TM1EasyAPIX Object Model for TM1 API

Post by paulsimon »

Version 1.9.4 of the TM1EasyAPIX has now been released.

Enhancements in this version include the ability to Get and Set the MDX expression of a Subset

There is an additional demo showing have a Private View can be published. This presents a Form which allows a different name for the Public version of the Private View to be selected. It allows the user to give different public names for any Private or Unregistered Subsets used by the View.
Post Reply