There is an App Builder API which will allow you to accomplish this task, but it is not officially supported by NI. The VIs are in [LabVIEW 20xx]\vi.lib\AppBuilder\AB_API, and there is an examples subfolder there with a few examples that should help you get started.