How to load TM1 libraries in Visaul Basic 2008

Post Reply
naika
Posts: 1
Joined: Thu Jan 28, 2010 7:52 pm
OLAP Product: tm1
Version: v9.0
Excel Version: 2003

How to load TM1 libraries in Visaul Basic 2008

Post by naika »

I'm working in Visual Basic 2008 and I want to load the TM1 libraries.

Can please, anyone helps me on how to do it?

Thank you very much
User avatar
Alan Kirk
Site Admin
Posts: 6606
Joined: Sun May 11, 2008 2:30 am
OLAP Product: TM1
Version: PA2.0.9.18 Classic NO PAW!
Excel Version: 2013 and Office 365
Location: Sydney, Australia
Contact:

Re: How to load TM1 libraries in Visaul Basic 2008

Post by Alan Kirk »

naika wrote:I'm working in Visual Basic 2008 and I want to load the TM1 libraries.
Can please, anyone helps me on how to do it?
As was mentioned in response to your other post under your other profile name a mere one day ago:
So-called Visual Basic 2008 is not Visual Basic, which finished at Version 6 regardless of what Microsoft claims.

See the FAQ thread heading "Location of API Libraries, .Net vs C/VB and Other Issues" for a link to a useful treatise on the subject by Mike Cowie.
"To them, equipment failure is terrifying. To me, it’s 'Tuesday.' "
-----------
Before posting, please check the documentation, the FAQ, the Search function and FOR THE LOVE OF GLUB the Request Guidelines.
olapuser
Posts: 40
Joined: Fri Jan 29, 2010 1:55 am
OLAP Product: Cognos TM1
Version: 9.5
Excel Version: 2007
Contact:

Re: How to load TM1 libraries in Visaul Basic 2008

Post by olapuser »

I see your previous post TM1.doc attachment. let me try to answer.

You are using visual studio express edition for visual basic 2008 version.

There are two ways to connect to TM1 or getting objects in TM1:
1. using the Applix.TM1.API under the TM1Web directory or
2. using the tm1api.dll in the program files directory

to use the first method simply add reference (just like you did) located in C:\inetpub\wwwroot\TM1Web\bin.
to use the second method you need to add the TM1 installation directory to Windows System Environment variables
My computer > properties > advanced > environment variables
add to Path C:\Program Files\Applix\TM1\bin

i don't know in vb but here an example i do it in C# language just add TM1 function in the tm1api.dll

Code: Select all

[DllImport("tm1api.dll")]
public static extern int TM1ServerProcesses();
[code][DllImport("tm1api.dll")]
public static extern int TM1ObjectListHandleByIndexGet(int hPool, int hObject, int iPropertyList, int iIndex);
then call the function

happy coding
Post Reply