From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
07-22-2010 09:30 AM
I am trying to determine status on controls embedded on a tab control. I can access the tab successfully by drilling down through the references for the panel and all objects on the panel, but the class that is returned is "TabArrayTabControl" (class ID 55). When I try to access the pages on this control using the refnum and "to more specific class" this class is not available as an option and if I use "TabControl" the VI fails (Error 1055 occurred at To More Specific Class in FIND FRONT PANEL CONTROLS.vi Possible reason(s): LabVIEW: Object reference is invalid.). I have tried "replacing" the control with a simple "tab", and the issue remains.
1) what is the distinction between a "TabControl" and a "TabArrayTabControl"
2) how do I resolve the issue?
Thanks
Solved! Go to Solution.
07-22-2010 09:38 AM
Post images to go with this Q.
noramlly I just grab the "Pages" property to keep drilling but I got lost in your write-up.
Ben
07-22-2010 09:42 AM - edited 07-22-2010 09:43 AM
When I place a tab control on the front panel (either the LabVIEW one or the System one) the class name is "TabControl". I'm a little confused as to how you're accessing the tab control and pages and what you're converting to a "more specific class". Your description made it sound like you're converting the pages to a more specific class, which doesn't make much sense to me. Are you accessing the tab that's on the VI that has the code, or are you accessing the front panel of another VI through a VI reference? Can you plese post your code?
EDIT: Glad to see I wasn't the only one confused by your post. I thought my brain was turning to mush a wee bit early.
07-22-2010 10:23 AM
thanks for your quick response. In attempting to send you visualsupport for this I inadvertantly "solved" the problem. It looks like I had accidentally corrupted the tab control refnum I had been pulling off the front panel. When I rewired things to make it clearer to you, I chnaged the manner in which I was passing the data through to the "to more specific class" and that solved things. Thanks for your help.
07-22-2010 10:28 AM
@Gavin Braithwaite wrote:
thanks for your quick response. In attempting to send you visualsupport for this I inadvertantly "solved" the problem. It looks like I had accidentally corrupted the tab control refnum I had been pulling off the front panel. When I rewired things to make it clearer to you, I chnaged the manner in which I was passing the data through to the "to more specific class" and that solved things. Thanks for your help.
Accidently fixing things is a sign of a good day.
Ben
07-22-2010 10:28 AM
Sorry, just to wrap up:
I was trying to access specific controls within tabs, and without knowing specifically what they are, or which page of the tab they were on (its a long story!). So far as I can see, the way to do this is to generate a refnum to the front panel of a VI, and use "allObjs" to find the tab control, and then use this refnum for the tab control. However, as I read it elsewhere I then had to use "to specific class" in conjunction with a tabcontrol class to yield a refnum I could use to access the individual pages of the tab. This does work (now that I fixed my error in my previous post) but I am still at a loss to explain what a TabArrayTabControl class is....
07-22-2010 10:34 AM
@Gavin Braithwaite wrote:
Sorry, just to wrap up:
I was trying to access specific controls within tabs, and without knowing specifically what they are, or which page of the tab they were on (its a long story!). So far as I can see, the way to do this is to generate a refnum to the front panel of a VI, and use "allObjs" to find the tab control, and then use this refnum for the tab control. However, as I read it elsewhere I then had to use "to specific class" in conjunction with a tabcontrol class to yield a refnum I could use to access the individual pages of the tab. This does work (now that I fixed my error in my previous post) but I am still at a loss to explain what a TabArrayTabControl class is....
I can't answer that Q off hand. Since you are walking a path I have tread, I'll offer this Nugget for your review. In that Nugget I try to offer some pointers on using Control references including the big challenge of how do you handle arrays if you don't know the data types.
Don't worry if the tail end of that Nugget gets hairy. The last part is more of a demonstartion that it can be done but you probably don't wan to.
Have fun!
Ben
07-22-2010 10:42 AM
thanks!