QV_MainProgΒΆ
QV_MainProg can execute the command File=>Channel Quick View.
- bool = QV_MainProg(ssTemplate, svFiles, ssXChannel, svChannels, svText, rvOptions)
Return Value
If the function succeeds, the return value bool is TRUE (1); otherwise it is FALSE (0).
Parameters
- ssTemplate
ssTemplate is the name of the template file. The file must be located in the directory
UniPlot\Template\qv(see File=>Channel Quick View). Hint: Use a slash ("/") instead of the backslash ("\") when entering the file name. Example:"c:/data/file.ipw".
- svFiles
svFiles is a string vector with data file names, e.g.
["c:/Data/file1.xls", "c:/Data/file2.xls"].
- ssXChannel
ssXChannel is the name of the channel that should be used for the x-axis. If an x-channel is not available ssXChannel should be an empty string (
ssXChannel ="").
- svChannels
svChannels is a string vector with y-channel names.
- svText
svText is a string vector with text for the $-place-holders.
- rvOptions
rvOptions is a vector with three elements:
[bShowFileOpenDlg, bShowChannelSelectDlg, bShowTextInputDlg].
Comment
The command File=>Channel Quick View and the function QV_MainProg
are written in UniScript. See files rs_qv.ic, rs_qv_dg.ic,
rs_qv_i.ic, rs_qv_st.ic in the UniPlot\Script directory.
Example
The following program imports two data files (Samples\Test1.xls und
Samples\Test2.xls). Then it creates the datasets "SB", "SZ",
"EngPwr", "SAEPwr" versus "EngSpd". The datasets will be loaded into
the template Template\qv\Default.ipw. Because rvOptions is set to
[0,0, 0] no dialog boxes will be displayed.
def Sample_1()
{
ssTemplate = "Default";
ssPath = GetRootDirectory() + "Samples/";
svFiles = ssPath + ["Test1", "Test2"] + ".xls";
ssXChannel = "EngSpd";
svChannels = ["SB", "SZ", "EngPwr", "SAEPwr"];
svText = ["Text1", "Text2"];
bShowFileOpenDlg = 0;
bShowChannelSelectDlg = 0;
bShowTextInputDlg = 0;
rvOptions = [bShowFileOpenDlg, bShowChannelSelectDlg, bShowTextInputDlg]
QV_MainProg(ssTemplate, svFiles, ssXChannel, svChannels, svText, rvOptions);
}
Sample_1()
See also
id-857604