I cannot add reference tm1api.dll and tm1lib.dll.

Post Reply
jariya@wish.co.th
Posts: 1
Joined: Wed Dec 22, 2010 3:57 am
OLAP Product: TM1
Version: 5.2.1
Excel Version: 2010

I cannot add reference tm1api.dll and tm1lib.dll.

Post by jariya@wish.co.th »

I am writing a project using Microsoft visual Studio 2008 by programming language C + +.

1. Setting path to the DLLs following steps in this link,
http://publib.boulder.ibm.com/infocente ... 8009A.html
2. Open Visual Studio and create a project.
3. Go to menu bar ‘Website’ and Add Reference
4. Go to tab ‘Browse’ and choose file tm1api.dll from path ‘C:\Program Files\Cognos\TM1\bin’ and click ok
Only add tm1api.dll, it show error ‘A reference to ‘C:\Program Files\TM1\bin\tm1api.dll’ could not be added. No type libraries were found in the component.’

I setting path include files and library files is C:\Program Files\Cognos\TM1\bin.

But Project Setting not "URL" in Microsoft visual Studio 2008.

Please tell me. :?:
User avatar
Mike Cowie
Site Admin
Posts: 484
Joined: Sun May 11, 2008 7:07 pm
OLAP Product: IBM TM1/PA, SSAS, and more
Version: Anything thru 11.x
Excel Version: 2003 - Office 365
Location: Alabama, USA
Contact:

Re: I cannot add reference tm1api.dll and tm1lib.dll.

Post by Mike Cowie »

Hi:

You can not create a reference to TM1 API DLLs from Visual Studio or any other development environment. They aren't that kind of DLL. These API DLLs require you, instead, to declare the functions that you plan to use in TM1API.DLL in your application in order to use them - there are sample C header/VB declaration files provided by IBM to help in this effort. The PATH setting is important so that Visual Studio can locate the DLLs and find the TM1 API functions you've declared.

Unfortunately, there are not very good examples in the TM1 API manuals with Visual Studio.NET, but there are some samples provided by IBM for Visual Basic and C++. You may find some additional information on the TM1 API in the TM1 API manual that may be useful. I'd also suggest searching around on this forum first for "TM1API" or "TM1 API" for additional information and possible examples. This kind of question has come up quite a bit.

Note there is also a Java TM1 API and a .NET TM1 API that may be useful to you as other alternatives, depending on what it is you're trying to do with a TM1 API.

Regards,
Mike
Mike Cowie
QueBIT Consulting, LLC

Are you lost without Print Reports in Planning Analytics for Excel (PAfE)? Get it back today, for free, with Print Reports for IBM Planning Analytics for Excel!
Post Reply