Jump to content

Recommended Posts

I am trying to find ways to automate Power BI Desktop (Locally installed app) and are now looking at APIs and DLL functions. I see Power BI has the following API but I have not been able to use it. I assume that is because I don't know what I am doing. Looking through the help and forums it looks like everyone is using APIs like Win32 API which I don't think is what I need. 

https://docs.microsoft.com/en-us/javascript/api/overview/powerbi/configure-report-settings#visual-rendered-events

I also looked at using DLL functions but I am having trouble finding if Power BI has any. I am using the DLL Export Viewer and it is great at finding Windows dll functions, but since I can't scan a single folder I am having to select the Power BI dlls one at a time and that is taking forever. I tried using the option to look for dlls functions related to a process but that returned a bunch of windows related dlls and nothing specific to Power BI.

Ultimately I am looking for something that will tell me when Power BI Desktop has finished rendering a report.

Does anyone have any suggestions to point me in the right direction for the API, DLL functions, or something else?

Thanks.

Link to post
Share on other sites
Link to post
Share on other sites

@Nine I looked through the Power BI - CLI and didn't see any functions that looked like they did what I needed. I tried to check it out anyway just in case, but it works with the Power BI Online service and not the Power BI Desktop app (which is what I am using). So it can't help me.

Link to post
Share on other sites

Well, for you information, this is an AutoIt forum.  Asking repeatedly the same question over and over about another software (not related to AutoIt) without getting any answer should tell you that you are not at the right place.  Maybe try to find a Power BI site, that could help you out, might be a better approach ?

Link to post
Share on other sites

This time I felt I was asking specific questions about using APIs and DLLs in general so that I could try and apply it to what I am trying to do with Power BI. I have also posted in Power BI related forums with not a lot of success there either.

Link to post
Share on other sites

I have invested quite an amount of time to help you before.  You cannot deny it.  Don't get me wrong.  If you cannot find a decent API for your issue, then go with the GUI and use UIAutomation.  But it is time for you to choose your preferred way.  And BTW I reviewed all the CLI offered and I do not see what is missing...

Link to post
Share on other sites
  • 4 weeks later...

I finally figured out a solution to my issue with timing actions in Power BI Desktop where it is rendering charts etc on the screen. I used PixelChecksum in a while loop to see when the screen is done rendering. If it hasn't changed in 3 seconds (plus the time it takes to run the code) then we assume the rendering is done and calc the time it took.

 

Local $hTimer = TimerInit()
         GetTime()
         $T1[$TR][4] = $GTime

         ; end time for open online Report
         Local $ic = "0", $ict = "0"
         While $ic < 30
            Local $iCheckSum = PixelChecksum(0, 0, $aClientSize[0], $aClientSize[1])
            Sleep("100")
            If $iCheckSum = PixelChecksum(0, 0, $aClientSize[0], $aClientSize[1]) Then
               If $ic = 0 then
                  Local $hTimerC = TimerInit()
                  GetTime()
               EndIf
               $ic += 1
               $ict += 1
            Else
               $ic = 0
               $hTimerC = ""
            EndIf
            Global $iTimeC = Round(TimerDiff($hTimerC)/10,0)
         WEnd
         Global $iTime = Round(TimerDiff($hTimer)/10,0)
         $iTimeT = $iTime - $iTimeC

 

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...