Vb.net with Pax

Post Reply
kavitha2002
Community Contributor
Posts: 180
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 »

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
Community Contributor
Posts: 167
Joined: Fri Aug 04, 2017 8:27 am
OLAP Product: TM1
Version: PAL 2.0.8
Excel Version: Office 365

Re: Vb.net with Pax

Post by orlando »

Hi,

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

Regards,
orlando
kavitha2002
Community Contributor
Posts: 180
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 »

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
Community Contributor
Posts: 167
Joined: Fri Aug 04, 2017 8:27 am
OLAP Product: TM1
Version: PAL 2.0.8
Excel Version: Office 365

Re: Vb.net with Pax

Post by orlando »

Hi,

yes, there is no VBA API for Pax anymore.

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

Regards,
orlando
kavitha2002
Community Contributor
Posts: 180
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 »

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: 77
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 »

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: 1453
Joined: Wed May 28, 2008 9:09 am

Re: Vb.net with Pax

Post by David Usherwood »

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
Community Contributor
Posts: 180
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 »

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: 77
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 »

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
Community Contributor
Posts: 180
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 »

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.
hadimulam
Posts: 5
Joined: Mon Feb 11, 2019 8:39 pm
OLAP Product: TM1
Version: PAX37
Excel Version: 2016

Re: Vb.net with Pax

Post by hadimulam »

What is the namespace here? I am trying to establish connection but I'm unable to do so. Please help
kavitha2002
Community Contributor
Posts: 180
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 »

Sorry for the late reply.

If Integratedsecuritymode=1, then the 4th parameter namespace is Host/Tm1 Instance

Where 'Host' is in which machine the TM1 is installed and 'Tm1 instance' is instance under TM1

Example: Machine01/TestInstance is the namespace, but its case-sensitive.

For Integratedsecuritymode=5, then namespace is Active Directory namespace which we configured in cognos Analytics configuration.

Hope it may help.
Post Reply