From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
06-05-2012 10:18 AM
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”.
06-06-2012 09:41 AM
Use a Pre-Expression for the Message Popup step to set the message expression.
RunState.Step.MessageExpr = "your text message here"
06-06-2012 02:49 PM
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.
06-06-2012 08:11 PM
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.
06-07-2012 10:41 AM
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.