Jump to content
News about the LabVIEW Wiki! Read more... ×
mike5

Add an existing control to a cluster

Recommended Posts

Well, the last step for this round.

Now that I have a DVR control (in a typedef ctl file), how do I add this control to class private data.

I've done this (the first vi is from the class.ctl):

post-17162-0-08087100-1309940057.png

Now what? Controls[] cannot be changed to "write". There is no method to add a new control. Will I really be forced to create a "new VI object" (as in the example) and replace it with my own control?

Thanks again and best regards, Mike

post-17162-0-08087100-1309940057_thumb.p

Edited by mike5

Share this post


Link to post
Share on other sites

Well, the last step for this round.

Now that I have a DVR control (in a typedef ctl file), how do I add this control to class private data.

I've done this (the first vi is from the class.ctl):

post-17162-0-08087100-1309940057.png

Now what? Controls[] cannot be changed to "write". There is no method to add a new control. Will I really be forced to create a "new VI object" (as in the example) and replace it with my own control?

Thanks again and best regards, Mike

Anyway, I just thought I'd mention. I'm trying to do all this in memory. Nothing is saved yet. Is this even possible. So far I've had zero progress.

Mike

Share this post


Link to post
Share on other sites

You can call the Move method on the new control and specify the cluster as the owner. This will move the control into the cluster.

Share this post


Link to post
Share on other sites

You can call the Move method on the new control and specify the cluster as the owner. This will move the control into the cluster.

Do I have ti get the control onto the destination panel first? Or can I just take control from the original file (the typedef CTL file), and then move it into the "private data cluster", and it will just work?

I don't know if I'm making myself clear....

Br, Mike

Share this post


Link to post
Share on other sites

You need a reference to the control so you can call the Move method on it. To get that reference you first need to drop the control somewhere:

post-1431-0-86016200-1309953070_thumb.pn

The easiest is probably to use the New VI Object primitive to drop the control.

Share this post


Link to post
Share on other sites

I just wanted to add that I got it working in a way now - without the "move" by creating an "new VI object" and replacing it with my DVR. The only problem is, that I needed to save everything. No way to do it just i the memory.

Mike

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×

Important Information

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