Planning Analytics

 View Only
  • 1.  Automate Task pane via API in PAX

    Posted Tue September 28, 2021 10:25 AM
    Hi folks, 

    im trying to automate the taskpane by using the following code sample but unfortunately got the error code 438. How can I fix this error? CognosOfficeAutomationExample and CognosOfficeMessageSupresser are included in the VBA Project.
    Sub hideTaskPane()
    Reporting.taskPane.Refresh
    End Sub​

    Thank you for your help



    ------------------------------
    Nico Krause
    ------------------------------

    #PlanningAnalyticswithWatson


  • 2.  RE: Automate Task pane via API in PAX

    Posted Wed September 29, 2021 09:44 AM
    Hi Nico,

    A 438 error indicates that a property or method you are trying to use does not exist. This is more than likely happening because the casing is incorrect in your call.

    https://ibm.github.io/paxapi/#refresh-task-pane

    Based on the above link, the call would need to be changed to the following.

    Sub hideTaskPane() Reporting.TaskPane.Refresh End Sub


    Thanks



    ------------------------------
    Matt Hopkins
    Senior Software Engineer
    QueBIT Consulting
    ------------------------------



  • 3.  RE: Automate Task pane via API in PAX

    Posted Thu September 30, 2021 04:07 AM
    Hi Matt,

    thank you for your quick response. I think you're right that the method does not exist, but I'm not sure weather its only incorrect casing in the method name because I changed my Procedure as follows and I got the same Error 438 as before:
    Sub refresh()
    #If False Then
       Dim TaskPane
    #End If
    Reporting.TaskPane.Refresh
    End Sub​

    Thank you for your help




    ------------------------------
    Nico Krause
    ------------------------------



  • 4.  RE: Automate Task pane via API in PAX

    Posted Thu September 30, 2021 08:34 AM
    Hi Matt,

    Maybe I found the problem. I worked with the PAX Version 2.0.59.5 and the TaskPane API came with Version 2.064. Do you know if there is a way to use the TaskPane API with an older version?

    Thank you for your help.




    ------------------------------
    Nico Krause
    ------------------------------