John Lokanis Posted January 25, 2007 Report Share Posted January 25, 2007 Hi, I have a need to programmatically copy an object's data and attributes to another object of identical type. My application has a top level display window with a tree control. I spawn several copies of a sub process that collects data and formats it for display. Each copy of this sub process has a tree control on it's FP that it writes data to and sets attributes of (symbols, colors, etc). My top level application has a selector that chooses which of the running sub processes to monitor. When I select one, I need to copy the data and attributes of it's tree control to the tree control on the top level app's FP. I don't see any way to do this. There does not seem to be a 'get all attributes' and 'write all attributes' feature anywhere. Since they are the same datatype, this seems like it should be possible. Has anyone put together some code that does this? thanks, -John Quote Link to comment
Darren Posted January 25, 2007 Report Share Posted January 25, 2007 Hi John, I don't have a way to copy the "attributes" from one control to another...it seems you would just need to create a VI that uses property nodes to get/set all the appropriate properties of the controls. As for the tree contents, I wrote this VI a while back that will duplicate the contents of one tree control into another. It's attached below, saved in LabVIEW 8.0 format. Let me know if you have any feedback, since I plan on shipping this VI in the vi.lib\tree folder in a future LabVIEW release... Hope this helps, -D Download File:post-4441-1169769387.vi Quote Link to comment
John Lokanis Posted January 26, 2007 Author Report Share Posted January 26, 2007 This is quite close to what I need, except I also need it to copy the background color of each cell. Not sure if I can mod it to do that. Another solution that just occured to me is to use sub panels to display the different VI's I am trying to monitor from my top level app's FP. That might be the simplest way to achive the desired results. -John Quote Link to comment
Rolf Kalbermatter Posted January 26, 2007 Report Share Posted January 26, 2007 This is quite close to what I need, except I also need it to copy the background color of each cell. Not sure if I can mod it to do that.Another solution that just occured to me is to use sub panels to display the different VI's I am trying to monitor from my top level app's FP. That might be the simplest way to achive the desired results. -John Your last suggestion was the first thing that came to my mind when reading your post on Info-LabVIEW. It would seem to me the perfect use case for sub panels. Rolf Kalbermatter 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.