Vb.net with Pax

Post Reply
kavitha2002
Posts: 74
Joined: Sat May 05, 2018 11:48 am
OLAP Product: tm1
Version: 10.3.10100.8
Excel Version: 14

Vb.net with Pax

Post by kavitha2002 » Tue Sep 25, 2018 9:37 am

Hello Everyone,

I am looking for some docs or input for integrating Tm1 Pax with Vb.net application. Earlier vb.net application was working with Tm1 perspectives. Now would like to convert Tm1 perspectives to Pax.

Any ideas or inputs are much appreciated.

Thanks

User avatar
orlando
Posts: 49
Joined: Fri Aug 04, 2017 8:27 am
OLAP Product: TM1
Version: PAL 2.0
Excel Version: Office 365

Re: Vb.net with Pax

Post by orlando » Tue Sep 25, 2018 11:47 am

Hi,

as far as i know, there is no VB API for PaX - you have to use the Rest API.

Regards,
orlando

kavitha2002
Posts: 74
Joined: Sat May 05, 2018 11:48 am
OLAP Product: tm1
Version: 10.3.10100.8
Excel Version: 14

Re: Vb.net with Pax

Post by kavitha2002 » Tue Sep 25, 2018 12:11 pm

Hi orlando,

I will put the question in different way, I want to open excel from vb.net application via code, and after opening the excel I have to connect to Tm1 instance for Pax using Tm1 macro functions or TM1 CognosOfficeAutomationObject.bas.

I think currently Pax doesnt support Macro functions, it support only API

Reference:

User avatar
orlando
Posts: 49
Joined: Fri Aug 04, 2017 8:27 am
OLAP Product: TM1
Version: PAL 2.0
Excel Version: Office 365

Re: Vb.net with Pax

Post by orlando » Tue Sep 25, 2018 12:20 pm

Hi,

yes, there is no VBA API for Pax anymore.

Sorry, i don't know anythink about the TM1 CognosOfficeAutomationObject.bas.

Regards,
orlando

kavitha2002
Posts: 74
Joined: Sat May 05, 2018 11:48 am
OLAP Product: tm1
Version: 10.3.10100.8
Excel Version: 14

Re: Vb.net with Pax

Post by kavitha2002 » Tue Sep 25, 2018 1:39 pm

Anyone has idea about CognosOfficeAutomationObject.Logon() API in VBA for TM1 Pax.

For IntegratedSecurityMode 1,
CognosOfficeAutomationObject.Logon("IBM Cognos Server Url", "username", "password", "pmhub host/TM1 Server instance") api is used to connect to Tm1 server instance.


But i dont know what url to give in place of parameters 'IBM Cognos Server Url' and 'pmhub host',

I gave IBM Cognos Server Url as http://92.168.40.100 paw IP address and pmhubhost as host where Tm1 server is running,

But doesnt connect. Any help is appreciated.

bgregs
Posts: 25
Joined: Wed Sep 12, 2018 11:19 am
OLAP Product: TM1 / Planning Analytics
Version: 2.0
Excel Version: 2016

Re: Vb.net with Pax

Post by bgregs » Tue Sep 25, 2018 8:05 pm

Hi Kavitha,

This is actually still possible, but the object has changed from "CognosOfficeAutomationObject" to "CognosOfficeAutomationExample". Please see page 197 of the following documentation:

https://www.ibm.com/support/knowledgece ... ug_cxr.pdf

David Usherwood
Site Admin
Posts: 1334
Joined: Wed May 28, 2008 9:09 am

Re: Vb.net with Pax

Post by David Usherwood » Wed Sep 26, 2018 6:51 am

Hope Revelwood won't mind me posting their writeup of PAX and VBA (I know, not vb.net, but it is relevant IMO):
https://knowledgecenter.revelwood.com/i ... api-calls/

kavitha2002
Posts: 74
Joined: Sat May 05, 2018 11:48 am
OLAP Product: tm1
Version: 10.3.10100.8
Excel Version: 14

Re: Vb.net with Pax

Post by kavitha2002 » Wed Sep 26, 2018 8:35 am

Hi @bgregs,,

I have tried with CognosOfficeAutomationExample just today morning, but that also doesnt works.

Tried the below:

CognosOfficeAutomationExample.Logon("http://192.168.40.100", "admin", "admin", "localhost/Tm1 server instance")

I dont know what could the first parameter. It stated that first parameter as IBM cognos server Url.

I tried with http://localhost:9510, http://localhost:8001, but nothing works:( what url i have to give?

One thing which i noticed is using http://localhost:9510 parameter, show all the Tm1 instances but none has connected.

Hi @David Usherwood,

I have gone through that link as well, but those steps I have already tried, its working except LOGON for IntegratedSecurityMode=1.

bgregs
Posts: 25
Joined: Wed Sep 12, 2018 11:19 am
OLAP Product: TM1 / Planning Analytics
Version: 2.0
Excel Version: 2016

Re: Vb.net with Pax

Post by bgregs » Wed Sep 26, 2018 11:47 am

Hi Kavitha,

Please see this link to the documentation: https://www.ibm.com/support/knowledgece ... ethod.html

Just wanted to reiterate, but there is a highlighted note stating:
Mode 1 authentication requires the combination of the PM Hub host and the TM1 Server as the namespace, separated by a forward slash (/). If your namespace contains a forward slash, the logon is interpreted as a Mode 1 authentication attempt.
Although it appears you've already tried that in one of your examples.

It looks like you're almost there, but I don't think you're properly calling the "url" parameter. Take a look at this page for a more in depth overview of the port and URI settings:
https://www.ibm.com/support/knowledgece ... eauri.html

Also note that in the IBM examples they are making calls to cognos.cgi (Common Gateway Interface) in the URL, although it is unclear to me if this is only needed for CAM so you would need to play around with it a bit.

Code: Select all

bResult = CognosOfficeAutomationObject.Logon
("http://localhost/ibmcognos/cgi-bin/cognos.cgi",
"Administrator", "CognosAdmin", "Production")

kavitha2002
Posts: 74
Joined: Sat May 05, 2018 11:48 am
OLAP Product: tm1
Version: 10.3.10100.8
Excel Version: 14

Re: Vb.net with Pax

Post by kavitha2002 » Wed Sep 26, 2018 12:19 pm

Hi @bgregs,

Thank you.

I found it, it worked well. Its because of the case-sensitivity of fourth Parameter: example : host/TestInstance.

Below worked:

CognosOfficeAutomationExample.Logon("http://192.168.40.100", "admin", "admin", "localhost/Tm1 server instance")

Paw IPaddress : http://192.168.40.100

Loads of thanks for response.

Post Reply