09-16-2015 01:37 PM
I want to export all my tree control's items to a 2D array of strings so I can use the data in another application. How do I do this programmatically? Do I have to iterate on items or is there some easy trick?
Solved! Go to Solution.
09-16-2015 01:46 PM
So MGI has a few tools that make going in the reverse a little easier. They have a function that takes a 2D array of string, and turns it into a tree, but they don't have a function that goes in reverse.
For you to do this you will need to iterate over all parents getting their children. But MGI does have a function that might help with this, and it gives you all children for a parent. Throw that in a while loop and a few shift registers and you should be able to go from a tree to a 2D array of string.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
09-17-2015 01:02 PM
Where do I go to get MGI VIs?
09-17-2015 01:19 PM
http://sine.ni.com/nips/cds/view/p/lang/en/nid/209753
Install VIPM, and it should show up in the list. Install the MGI Tree.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
09-24-2015 08:49 AM
Thanks, I suppose I will thus have to parse thru the tree control with a complex program also.
04-27-2017 10:40 AM
>>> Install VIPM, and it should show up in the list. Install the MGI Tree.
Honestly,
It doesn't look very reasonable to waste time downloading and installing over 100Mb of unnecessary stuff just to see <10Kb file.
04-27-2017 10:51 AM
All required MGI and OpenG dependencies are 15MB, and if I'm being honest there are so many useful code utilities in OpenG and MGI that I'd be willing to wast 100MB of space for it if it really was that large. Hard drive space is cheap, what is expensive is time and MGI and OpenG has many years of refinement and features.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
04-27-2017 11:27 AM
Still installing.....
I don't need those "useful code" at all. What I need - just a single file with the example.
Please consider this as a kind of "Customer's feedback".
04-27-2017 12:30 PM
Here's how I would do it...the only drawback is that you have to know how many columns there are in the tree.
04-28-2017 03:00 AM
Hi, thanks for your replay.
This solution was the first thing came to my mind and I did pretty similar code.
BUT, the problem with this solution is that for the tree 50x12 size it takes around 1.5sec to execute it.
Which is absolutely unacceptable for my task as tree is a part of the GUI where the conversion should be done "on the fly" and shouldn't slow down the main loop.
So I started looking for some different ideas which may potentially work faster.
So you are welcome to share your thoughts if you have any ideas how too make the conversion faster.