TM1 API and VS 2005

Post Reply
ValI
Posts: 1
Joined: Mon Apr 27, 2009 7:56 pm
Version: 9.4
Excel Version: 2003 2007

TM1 API and VS 2005

Post by ValI »

I created a project that will update both TM1 and SQL Server security, so I won’t need to synchronize the servers in the overnight process, and all my changes will be real time for both databases. Everything is easy for SQL, but TM1 is a little more complicated. I am using functions that come from tm1api.dll file provided by our Cognos. I can access the file, and I already created a web page with necessary functionality, but here is what happens when I open it. It opens just fine on my computer if I update Path in Environment Variables and add the folder where TM1 is installed. However, I don’t want to update Path on each server (development, preprod and production) where my application will be tested and used. So, I thought if I add a reference to the dll in my project, it will make this file local for the project. I tried that and got an error message: "A reference could not be added. No type libraries were found in the component." I guess this error means that it is not a .net dll, but I could not find any information how I should use other types of dll. If I add it to the bin folder, it’s not being recognized. If I keep a new Path but don’t include tm1api.dll file into the project at all, everything works properly, which probably means that I am not looking for the source code within the project. Does anyone know any work around for this issue by any chance? I will really appreciate your help.
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: TM1 API and VS 2005

Post by paulsimon »

ValI

I developed a product called the TM1EasyAPI which provides an object model wrapper over the raw TM1 API. This is an ActiveX but I have an ActiveXDLL version which can be wrapped as a .Net component. I typically use it from inside Excel. That works well as Excel already loads the relevant libraries, so there is no problem in finding the tm1api.dll. If you join my yahoo group paulsimonolap, then you can download the set up instructions for this. That should give you some tips. However, I think that your only options are to set the path, or set a reference. NB you would need to copy various files listed in the install document, as the tm1api.dll refers to other dlls so it won't work in its own.

However, if all you want to do is to set security, then I would go for the route of running a TI process to do that. You could set the source as your SQL Server database and read in the details then use ElementSecurityPut etc to set the security. That seems easier than struggling with the API (and it is always a struggle).

Regards


Paul Simon
Post Reply