Why Does The Expression Value In The XML File Is Unable To Write Into The TestStand Sequence File Generated Programmatically Using LabVIEW?

Updated Oct 18, 2024

Reported In

Software

  • TestStand
  • LabVIEW

Issue Details

I am using the shipping example C:\Users\Public\Documents\National Instruments\TestStand 2020 (64-bit)\Examples\TestStand API\Building a Sequence Using API\LabVIEW to build a TestStand sequence file using XML file. 

I realized that I am unable to get the expression value defined in the XML file to be written into the newly generated TestStand sequence file.

XML Snapshot:
image.png

Generated sequence file:
image.png
We can see that the Pre-Expression here is empty although we have defined it in the XML file.

Solution

This is because the Pre-Expression is one of the hidden properties in TestStand . Hence, we would need to include TS. in front of the PreExpr in the XML file, result as follows:
image.png
Newly generated sequence file as of the XML above will have the value written in the Pre-Expression tab:
image.png

Additional Information

Special symbols (<, >, &, ', ".) in XML need to be escaped when we define it in the XML file. For example:
<&lt;
>&gt;
&\&

If some of the symbols could not be escaped using the Escape sequence , try adding in a \ in front of the symbols.