NI TestStand

Showing results for 
Search instead for 
Did you mean: 

How to print Message Popup

I am using a message popup box to display a datasheet with a list of required materials needed to run a test program (i.e. equipment list).   I would like to add an option to print the text in the “message expression”.

0 Kudos
Message 1 of 5

Use a Pre-Expression for the Message Popup step to set the message expression.


RunState.Step.MessageExpr = "your text message here"

0 Kudos
Message 2 of 5

Thanks, but I’m really looking for a way to print the text in the message box without writing a vi.  Ideally I would like to have my message box come up with some text and have an “OK” button to continue and a“PRINT” button to send the message box text to the default windows printer.

0 Kudos
Message 3 of 5

Start by Creating a string variable to contain your text, Local.EquipmentListStr


Add the Pre-Expression to your Message Popup Step:

RunState.Step.MessageExpr = Locals.EquipmentListStr.


Set the properties of the Message Popup to include 2 buttons, “OK” and “PRINT”


To Print the Message String, Create a new TS step immediately after the Message Popup step that has the Pre-Condition set to check the RunState.PreviousStep.Result.ButtonHit == 2.  This will execute only if the “PRINT” button (2) is pressed. You’ll then have to call a VI or other print function, passing the string, Locals.EquipmentListStr and Path to print to your desired device.

0 Kudos
Message 4 of 5

Attached is a TestStand 2010 sequence example that uses an existing LabVIEW 2011 utility VI to print text to the default printer.



Todd K - Digalog Systems Inc.

0 Kudos
Message 5 of 5