From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
07-29-2009 03:16 PM
Hi All,
I am building a 'BD-Mosaic' LabVIEW IDE Tool.
For this tool I need all the VIs which BDs are open. However getting all the VI references for an application, results in >300 VIs, getting the BD.Status property of every VI takes up to 3 seconds.
Not very good...
Has anyone a quick method to get all the VIs with an open Block diagram?
Most favourable would be an invoke node : App.OpenBlockDiagrams
Ton
07-29-2009 03:41 PM
Have you benchmarked exactly where your problem is occurring? Querying for the BD.State property takes between 10µs and 20µs on my machine (3.0GHz Core 2 Duo processor). How are you getting the VI references?
07-29-2009 03:54 PM
App.AllVIs in memory.
Will do some more benchmarking on friday.
Have you tried getting the BD.Status as well?
Ton
07-29-2009 04:15 PM
Using the above code, it took between 250ms and 350ms to query a bit over 600 VIs and controls. If you are using a build array primitive in your query code, this may be causing the slowdown.
I do not have a BD.Status property. I suspect a localization difference.
07-29-2009 04:39 PM
A few years ago Jack Hamilton put together a utility called Workspace that would save and restore the layout of open VIs on the desktop.
I rewrote and extended it to include open block diagrams, give a list of files, browse the files to exclude restore of given VIs, etc and called it Workspace2000 and later Workspace2003 setup to be aTools menu item in LabVIEW.
I used it all the time to take a snapshot of my desktop, then close all the open VIs (there is a button to do that, it also allows you to save VIs if needed before closing), then open another desktop layout of VIs for a different client's work. I couldn't live without it. However, then LabVIEW projects came around.
The code is rather old, (V6.1) so it should run on everything, maybe even RT (not sure).
It does not handle the Project and associated memory spaces and application/project references. That was my next item to add, but things have been to busy and the next version was pushed back a lot.
If it helps, hooray. It would be nice to see some more tools /IDE stuff of this type.
Cheers,
Mike Ashe
07-30-2009 01:23 AM
Is there not a way (LabVIEW or OS) to get all application's windows?
We have two ears and one mouth so that we can listen twice as much as we speak.
Epictetus
07-31-2009 01:05 AM
My bad, the code I used on the open BDs was the actual slow code.
Ton