NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

How do you progamattically set break on fail, base on a variable?

I am writing an application that will require me to break on fail but only if certain conditions apply after login. I have looked through a lot of the material online and in the help file and cannot seem to get it working or find an good solution. Can anyone help?

0 Kudos
Message 1 of 2
(2,918 Views)

Tyler,

 

For all the love you've given me in the past.  Here is an example in 2010.

 

You can read about it in the TS help but the keys are this:

 Locals.MyWatchExp = RunState.Engine.GetWatchExpressions(Nothing, Nothing,0).Insert(Nothing)  will set Locals.MyWatchExp to the new Watch Expression

 

Now you can start setting the properties:

Locals.MyWatchExp.AsWatchExpression.Expression = "Locals.Foo",
Locals.MyWatchExp.AsWatchExpression.BreakpointType = 0x1

 

Then change Foo and away you go.

 

Cheers,

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
Message 2 of 2
(2,887 Views)