Modify Sequence File Comment
Downloads
Filename: modifyseqfilecomment.zip
Requirements: View
There are two methods to modify the sequence file comments. The first method is preferred.
1. Make a Tools menu item to modify the selected sequence file in the sequence editor window. To make a Tools menu item, select Tools>>Customize from the sequence editor.
a. Click Add in the Add Tool Menu Item dialog.
b. Select Sequence
c. Browse for the sequence file and select ToolsMenuModifySeqFileComments.seq wherever you saved it. If prompted to resolve the path to find the sequence file, select to use a Relative Path for the file you selected.
d. In the Add Tool Menu Item dialog, the Sequence control should be set to MainSequence. Click OK.
e. In the Customize Tool Menu dialog, make the following settings.
f. Item Text Expression = "Modify Sequence File Comment"
g. Hidden Expression = !RunState.IsEditor
h. Enable Expression = PropertyExists("RunState.InitialSelection.SelectedFile")
i. Make sure your settings are similar to those shown in the screenshot below.
j. You won't see the sequence file comments under the Edit>>Sequence File Properties dialog, but only using the Tools menu item.
2. Another method uses the SequenceFileLoad and SequenceFileUnload callbacks to save the sequence file comment. This method has the advantage that you can modify the sequence file comments using the Edit>>Sequence File Properties dialog. However, every time that you close the sequence file, you will be prompted to save the sequence file. This additional prompt is necessary to ensure that the sequence file comment is saved, however it will save any other sequence file modifications.
To modify your sequence files to use this technique follow the instructions below:
a. Modify your existing sequence files to use a SequenceFileLoad and SequenceFileUnload callback. Use the Edit>>Sequence File Callbacks dialog to create the callbacks.
b. Open ModifySeqFileCommentsUsingFileLoadUnloadCallbacks.seq.
c. Open your existing sequence file where you want to modify the sequence file comment.
d. In both your sequence file and ModifySeqFileCommentsUsingFileLoadUnloadCallbacks.seq, select the SequenceFileLoad sequence using the View ring.
e. Copy the steps from the main step group from ModifySeqFileCommentsUsingFileLoadUnloadCallbacks.seq to your sequence file.
f. Select the locals tab of the SequenceFileLoad sequence of both your sequence file and ModifySeqFileCommentsUsingFileLoadUnloadCallbacks.seq. Copy the Comment variables from ModifySeqFileCommentsUsingFileLoadUnloadCallbacks.seq to your sequence file.
g. Repeat steps e. and f. using the SequenceFileUnload callback sequence.
Requirements
Filename: modifyseqfilecomment.zip
Software Requirements
Application Software: TestStand Development System 1.0.1
Language(s): None
Reader Comments | Submit a comment »
Legal
This example program (this "program") was developed by a National Instruments ("NI") Applications Engineer. Although technical support of this program may be made available by National Instruments, this program may not be completely tested and verified, and NI does not guarantee its quality in any way or that NI will continue to support this program with each new revision of related products and drivers. THIS EXAMPLE PROGRAM IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND AND SUBJECT TO CERTAIN RESTRICTIONS AS MORE SPECIFICALLY SET FORTH IN NI.COM'S TERMS OF USE (http://ni.com/legal/termsofuse/unitedstates/us/).
