Academic Company Events NI Developer Zone Support Solutions Products & Services Contact NI MyNI
This Document is not yet Rated  Rate this Document

How Can I Programmatically Add Watch Expressions to my TestStand Execution?

Primary Software: TestStand
Primary Software Version: 3.1
Primary Software Fixed Version: N/A
Secondary Software: N/A

Problem:
I'd like to programmatically add (or delete) Watch Expressions to my TestStand execution for the purpose of debugging.  Is there an easy way to do this?

Solution:
In order to achieve this, use the following procedure:
  1. Call the GetWatchExpressions method of the Engine to return an Object Reference to the WatchExpressions list. 
  2. After you retrieve the Object Reference to this list, you can call the Insert method, which will return an Object Reference to the newly inserted WatchExpression.
  3. Set the Expression property of this newly inserted WatchExpression in order to specify the Expression.

The procedure is demonstrated in the attached Sequence File.

If you'd like to programmatically delete a Watch Expression instead, use the Remove method in step two.



Related Links:

Attachments:
Dynamically Insert WatchExpression.seq




Report Date: 06/17/2008
Last Updated: 06/18/2008
Document ID: 4MGFB26X

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
  1 2 3 4 5
Please Contact NI for all product and support inquiries.submit