01-10-2011 05:25 AM - edited 01-10-2011 05:27 AM
Hello,
i have a Vi with a tabcontrol and two pages. On each page is a string-control (string1 and string2).
Now i have second vi that gets the file-reference of the first vi and is called inside of the first vi.
This reference do i want to use to change the value of the string-control.
But i dont have access to "pages" when using the reference.
Attached the two vis.
Thanks for the help
01-10-2011 06:25 AM
01-10-2011 07:12 AM
@OnlyOne wrote:
[...] But i dont have access to "pages" when using the reference.
You can do this to address this problem. Convert the generic reference to a TabControl to get the TabControl-specific properties.
01-10-2011 10:22 AM
Thanks for the help.
But how can i create this TabControl-Reference?
I do it like:
1. Create a reference from the TabControl
2. Create a constant from this reference
its working, but the text of the constant is "TabControl (strict)".
01-10-2011 10:39 AM
I just showed a small part of your original diagram; you don't need to create a reference. Here's the whole thing (after executing Clean Up Diagram on your VI). I prefer my solution in my original response over this one, though.
01-10-2011 10:43 AM
Yes, i understand that. But my question is: how can i create thie green TabControl for the typecast (which is shown in your picture on the upper right side)?
Than you
01-10-2011 10:50 AM
Easiest way that I know is to right click on the control itself and select "Create->Reference".
01-10-2011 10:53 AM
Oh, ic.
You can pull a Class Specifier Constant out of the Application Control pallet, or right-click on the To More Specific Class target class terminal and create one. Click on it and browse through to the type you need:
01-10-2011 11:00 AM
Btw, that's not a reference to the Tab Control, it's a type specifier that tells the To More Specific Class what type of object to convert the reference to. The conversion will fail if the reference isn't for a Tab Control, and you'll get an error. That's how I found the Tab Control in the Controls[] array in the original answer - I know that there's only one Tab Control on the panel so I continue iterating if I get the conversion error.