mariuszl2 Posted August 7, 2012 Report Share Posted August 7, 2012 Hi. I have a front panel that consists of 30 XControls. Depending on the test each of them has to have different caption and position. I use an .ini file to read the configuration data and assign it to the specific XControl. But if I have many Xcontrols i have to create separate Property Nodes and assign the data for every control separately. Is there a way to put this inside a loop so the code uses smaller area of the screen? Quote Link to comment
shoneill Posted August 7, 2012 Report Share Posted August 7, 2012 Why doesn't the XControl initialise itself. That way there's much less code on your VI Block diagram. Quote Link to comment
asbo Posted August 7, 2012 Report Share Posted August 7, 2012 shoneill's suggestion makes the more sense, but if you can't do that, build an array of the XControl references, wire that into a for loop, and go to town. Quote Link to comment
mariuszl2 Posted August 7, 2012 Author Report Share Posted August 7, 2012 (edited) I build an array of references and managed to do what I wanted. Sadly, I dont understand shoneill's suggestion. Can You be more specific? How can it initialize itself? Edited August 7, 2012 by mariuszl2 Quote Link to comment
Ton Plomp Posted August 8, 2012 Report Share Posted August 8, 2012 In your init state of the XControl you could read the settings from the configuration file and load them. If the XControl is an initial drop the previous version is different than 0.0.0.0, and you can get the label of the control to read the ini section. Ton Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.