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”.
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.
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.
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.