Page 1 of 1

PAX API - TI Process - error 438

Posted: Tue Aug 13, 2024 7:00 pm
by tanjim.haque
Error 438 to execute TI process from macro for PAX addin.

Public Sub PAX_TI_Process(sHost As String, sServer As String, sProcessName As String, Optional sParam1 As String, Optional sParam2 As String, Optional sParam3 As String)

On Error GoTo HANDLER:
Dim oMessageSuppressor As CognosOfficeMessageSuppressor

'Use the message suppressor to turn off all Cognos Office messages.
Set oMessageSuppressor = New CognosOfficeMessageSuppressor

Dim sTIParamList As String

If Not IsMissing(sParam1) Then sTIParamList = sParam1
If Not IsMissing(sParam2) Then sTIParamList = sTIParamList + "," + sParam2
If Not IsMissing(sParam3) Then sTIParamList = sTIParamList + "," + sParam3

'Call the Cognos Office Automation object to refresh the data.
Application.COMAddIns("CognosOffice12.Connect").Object.AutomationServer.Application("COR", "1.1").ExecuteFunction sHost, sServer, sProcessName, sTIParamList

Exit Sub
HANDLER:
MsgBox "Error PAX API - TI_Process (ExecuteFunction)- " & Err.Number
End Sub

Public Sub test()
Call PAX_TI_Process("host address:port", "server name", "process name")
End Sub

i tried to check if it is connected to the server, using this
curl -v telnet://host address:port
it connects. Not sure where I am doing wrong.

Re: PAX API - TI Process - error 438

Posted: Wed Aug 14, 2024 7:16 am
by Wim Gielis
Can you get it to work for a process that has no parameters ?

Re: PAX API - TI Process - error 438

Posted: Wed Aug 14, 2024 3:13 pm
by tanjim.haque
It didnt work without parameters as well. I tried both with parameters and without parameters.

Re: PAX API - TI Process - error 438

Posted: Mon Aug 19, 2024 4:44 pm
by WilliamSmith
Error 438 in VBA generally means the object you are trying to invoke a property / method from is not a valid binding.

Do you have the Planning Analytics for Excel add-in loaded and fully enabled?