NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

VariableView ActiveX Control for a single variable

This may be an odd request, but is it possible to limit the scope for the VariablesView ActiveX control to a single variable? 

 

I was thinking of adding a pseudo-watch window and the VariablesView control is perfect if I could just limit its scope.  Building my own hybrid treeview/gridview is my other option.

 

Any language will work; I am working in C#. 

 

 

0 Kudos
Message 1 of 5
(3,417 Views)

The Variables View control can only be connected to display the active Sequence Context of the currently selected sequence or execution.

 

It looks like you will have to use your own control for such behavior.


Allen P.

NI

0 Kudos
Message 2 of 5
(3,407 Views)

I wonder what would happen if you called NewEditContext, used the PropertyObject API to delete all the subproperties, and then called context.AsPropertyObject.SetPropertyObject("MyVariableName", PropOption_InsertIfMissing | PropOption_NotOwning, myVariable)?

 

The context would probably be completely broken as a context, but it might work in the variables view..... well, probably not, but maybe worth a quick try if you've already got your control and variable ready to go....

0 Kudos
Message 3 of 5
(3,405 Views)

Thanks very much for the answers; I was afraid it was not possible.

 

I tried various hacks on the SequenceContext (not knowing what I was really doing) and the results varied from no effect to a C++ crash with a pure virtual call error.

 

Unfortunately, I doubt I will design my own; my users expect the slick and polished variables view in TestStand which I could never hope to reproduce.

 

Thanks again. 

0 Kudos
Message 4 of 5
(3,390 Views)

Another hack idea which is probably also destined to fail, it to try hide the top level items in the new edit context you don't want to show by using the hidden flag. Maybe you could hide everything and insert your variable at the top level instead of within locals.

 

I'm not optimistic, but it should also be quick to try out.

0 Kudos
Message 5 of 5
(3,387 Views)