NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

TS_ExprCtrl_GetCtrls

In TestStand 2.0 the TSUtil.c module contains a function TS_ExprCtrl_GetCtrls which we use throughout one of our applications. (Although this function didn't appear in the .fp file) This function does not appear to exist in TestStand 3.1. What is the equivalent function in TestStand 3.1?
0 Kudos
Message 1 of 4
(2,950 Views)
Hi Brian,
as far as I can see, the function was never used in any code in TestStand 2.x, and hence
it was removed.
The functionality used inside the TS_ExprCtrl_GetCtrls is still available however, so in theory
(depending on how you're using it) you shoudl be able to copy the code across and put it into your project.
The TS_ExprCtrl has changed slightly between versions, and although most of the items have been left, the
"isTextBox" integer has been removed.

int CVIFUNC_C TS_ExprCtrl_GetCtrls(int panel, int stringCtrl, int *ringCtrl, int *exprBtn)
{
int error = 0;
TS_ExprCtrl *exprCtrl;

errChk( GetChainedCallbackData (panel, stringCtrl, kTS_ExprCtrl_Id, (void **)&exprCtrl));

if (ringCtrl)
*ringCtrl = exprCtrl->ringCtrl;

if (exprBtn)
*exprBtn = exprCtrl->exprBtn;

Error:
return error;
}

Hope that helps

Thanks

Sacha Emery
National Instruments (UK)
// it takes almost no time to rate an answer Smiley Wink
Message 2 of 4
(2,924 Views)
Thanks Sacha,

I'll give that a try and let you know how it goes!

Regards,

Brian
0 Kudos
Message 3 of 4
(2,921 Views)
Sacha,

Got the function to work eventually. Thanks for the help!

Regards,
Brian

static int TS_ExprCtrl_GetCtrls(int panel, int stringCtrl, int *ringCtrl, int *exprBtn)
{
int error = 0;

errChk(TS_ExprCtrl_GetComponentCtrl (panel,stringCtrl,
kTS_ExprCtrl_Component_Ring, ringCtrl));

errChk(TS_ExprCtrl_GetComponentCtrl (panel,stringCtrl ,
kTS_ExprCtrl_Component_Browse, exprBtn));

Error:
return error;
}
0 Kudos
Message 4 of 4
(2,915 Views)