NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

What ref to use on i/p 'objecttobrowse' in method 'DisplayBrowseExprDialog'?

Hi,

I am writing an edit settings UI for a custom step type in labVIEW 7.1 for Teststand 3.1. I am using the DisplayBrowseExprDialog method to allow some parameters to be set with the expression browser.

The expression browser loads/works fine except that the Variable/Properties box does not contain the expected items (+Step, +Locals, +Parameters... etc).

I feel the problem is with the reference I am passing to the 'objecttobrowse' parameter, but I am unable to find the solution. I have attached a vi containing a snippet of the code surrounding the DisplayBrowseExprDialog method (The vi will itsef not run as the seq.cont. ref will be null - its just a peak at the sort of thing I am trying). Any help / pointers would be appreciated.

Cheers,
Bazza
0 Kudos
Message 1 of 5
(3,235 Views)
Hi Bazza,

You should be passing the SequenceContext.
Also you would be best to use DisplayBrowseExprDialogEx, this will allow you to create properties within the Browser by the use of right mouse click.

Can you post your example.

Regards
Ray Farmer
Regards
Ray Farmer
0 Kudos
Message 2 of 5
(3,229 Views)
Thankyou for replying Ray,

I didnt mean to mislead you but the method I am using is Engine.DisplayBrowseExprDialogEx as I am not using an ExpressioEdit control.

I have tried re-attaching a .jpg (the *.vi was not attaching) of an example I have tried - hope it works this time, and is useful in helping me.

I have tried my best to follow the info given in the teststand help, where it says you must pass a sequencecontext (as you also suggested). But isnt the sequence context effectively null if you are not running any given sequence and to all intents and purposes using a mini OI (or an edit step type UI).

Please help anyone. This is driving me mad! It should be so simple..

Cheers,

Barry
0 Kudos
Message 3 of 5
(3,217 Views)
Hi Bazza,

Use the sequenceContext you original pass to the VI not a newly created one.

This should solve your problem.

regards
Ray Farmer
Regards
Ray Farmer
0 Kudos
Message 4 of 5
(3,204 Views)
Hi Bazza,

Clarify:-

Use the original sequenceContext you pass to the VI, not a newly created one, to create a PropertyObject from the SequenceContext.AsPropertyObject method.

This should solve your problem.

regards
Ray Farmer
Regards
Ray Farmer
0 Kudos
Message 5 of 5
(3,199 Views)