.. highlightlang:: us .. index:: QV_MainProg .. _qv_mainprog: QV_MainProg =========== .. us.tag QV_MainProg ENGLISH :ref:`QV_MainProg` can execute the command :ref:`filechannel-quick-view`. .. function:: bool = QV_MainProg(ssTemplate, svFiles, ssXChannel, svChannels, svText, rvOptions) .. us.return **Return Value** If the function succeeds, the return value *bool* is TRUE (1); otherwise it is FALSE (0). .. us.params **Parameters** .. uparam:: ssTemplate *ssTemplate* is the name of the template file. The file must be located in the directory :file:`UniPlot\\Template\\qv` (see :ref:`filechannel-quick-view`). Hint: Use a slash (``"/"``) instead of the backslash (``"\"``) when entering the file name. Example: :file:`"c:/data/file.ipw"`. .. uparam:: svFiles *svFiles* is a string vector with data file names, e.g. ``["c:/Data/file1.xls", "c:/Data/file2.xls"]``. .. uparam:: 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 =""``). .. uparam:: svChannels *svChannels* is a string vector with y-channel names. .. uparam:: svText *svText* is a string vector with text for the $-place-holders. .. uparam:: rvOptions *rvOptions* is a vector with three elements: ``[bShowFileOpenDlg, bShowChannelSelectDlg, bShowTextInputDlg]``. .. us.comment **Comment** The command :ref:`filechannel-quick-view` and the function :ref:`QV_MainProg` are written in UniScript. See files :file:`rs_qv.ic`, :file:`rs_qv_dg.ic`, :file:`rs_qv_i.ic`, :file:`rs_qv_st.ic` in the :file:`UniPlot\\Script` directory. .. us.example **Example** The following program imports two data files (:file:`Samples\\Test1.xls` und :file:`Samples\\Test2.xls`). Then it creates the datasets ``"SB"``, ``"SZ"``, ``"EngPwr"``, ``"SAEPwr"`` versus ``"EngSpd"``. The datasets will be loaded into the template :file:`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() .. seealso:: :ref:`filechannel-quick-view` :sub:`id-857604`