Jump to content

Copy data AND attributes?


Recommended Posts

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

Link to comment

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

Link to comment

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

Link to comment
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

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.