LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
raphschru

Interactive Application Builder API

Status: New

Currently, when you programmatically build an application using the "Build" VI of the App Builder API, you have no feedback (such as build details, progress percentage, warnings, errors...) and no ability to cancel while it builds.

So you have no idea how long it will take to build and cannot cancel if it takes too long.

 

It would be great to have these interactions, just like with the manual build:

raphschru_1-1664575565945.png

 

The Build VI could have 2 notifiers or user events as additional inputs:

- 1 to receive build details, progress percentage, warnings and errors

- 1 to send the Cancel command

 

These additional inputs would be optional and default to invalid refnums, which would mean "do not use the feature".

4 Comments
Petru_Tarabuta
Member

Kudos. Excellent idea.

joerg.hampel
Active Participant

I don't know about the cancel action, but the AB_API found at \vi.lib\AppBuilder\AB_API\ does offer what you are looking for (search for "progress bar events").




DSH Pragmatic Software Development Workshops (Fab, Steve, Brian and me)
Release Automation Tools for LabVIEW (CI/CD integration with LabVIEW)
HSE Discord Server (Discuss our free and commercial tools and services)
DQMH® (The Future of Team-Based LabVIEW Development)


Kyle97330
Active Participant

Like Joerg says, if you specifically run this VI from that API:

 

\vi.lib\AppBuilder\AB_API\Build\Create Progress Bar Events.vi

 

Then it has an output which contains 3 events you can register for that tell you what's going on, and a fourth that lets you cancel the build when you send it.

 

Kyle97330_0-1677278434839.png

 

raphschru
Active Participant

@joerg.hampel @Kyle97330

Thanks, I could reproduce almost identically the native build dialog.


Some details I learned:

 - At the beginning of the build, the message "Initializing build. This could take several minutes..." (like in the native build dialog) is not sent through the events, so you must display it yourself before starting the build.

 - The first event received is "newItem" with the argument "Dummy" containing the string value "EnableCancelButton". This indicates that you can send the "cancel" event from now on.

 - The second event received is "newJob" with the arguments "label" being the build spec name and "#ofItems" being the number of build steps. This allows to initialize the scale of your progress bar.

 - Then you'll receive N times the event "newItem", with the "Dummy" argument being the description of the current step. This allows to increment your progress bar.

 

Also some caveats:

 - When fired, the cancel event sometimes hangs LabVIEW forever, so it is not really reliable.

 - The "TargetItem Refnum" passed to the Open Build VI is automatically closed when calling the Close VI.