NI TestStand Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
Josh_W

Make it easier to pass filenames as constant strings

Status: Completed
With the release of TestStand 2012 you no longer need to escape backslashes in the path string. You can simply prefix the path string with the @ symbol to automatically escape the backslashes. For more details on this new feature, check out the "Expression Language Enhancements" section in the NI TestStand 2012 Help under What's New in TestStand>>TestStand 2012>>New Features. Thanks for the feedback! Lars

How many times have you found yourself typing double backslashes "C:\\Windows\\System32\\cmd.exe" or even worse, going through a copied path to change every backslash to a double backslash (and inevitably missing one), just so you can pass a file or directory as a constant to a code module or another sequence?

 

string issue.png

 

I'd like to see a symbol for 'explicit string' in the TestStand expression language, much like C# does with the @ symbol.

So if we typed @"C:\windows\temp" we would actually get the string "C:\Windows\temp" instead of "C:\Windows<tab>emp".

 

To really go the extra mile on this:

  • Drag and drop could be enabled, so that any file dragged from another window into an expression box would automatically paste the filename.
  • A browse button could be added to the expression browse dialog which would bring up the usual file open dialog and insert the selected filename.
Message Edited by Josh W on 06-14-2010 12:57 PM
Message Edited by Josh W on 06-14-2010 12:58 PM
Josh W.
Certified TestStand Architect
Formerly blue
3 Comments
Jervin Justin
NI Employee (retired)
Status changed to: Under Consideration
 
Jervin Justin
NI TestStand Product Manager
Al.B
NI Employee (retired)

FYI - You can already acheive similar behavior using the Utility.Escape() method (credit to Doug), but I agree that a non-API method of doing this would be much easier and cleaner.

Al B.
Staff Software Engineer - TestStand
CTA/CLD
Lars_L
NI Employee (retired)
Status changed to: Completed
With the release of TestStand 2012 you no longer need to escape backslashes in the path string. You can simply prefix the path string with the @ symbol to automatically escape the backslashes. For more details on this new feature, check out the "Expression Language Enhancements" section in the NI TestStand 2012 Help under What's New in TestStand>>TestStand 2012>>New Features. Thanks for the feedback! Lars