.. highlightlang:: us .. index:: DS_SetDataSource .. _ds_setdatasource: DS_SetDataSource ================ .. us.tag DS_SetDataSource NOTREADYENGLISH DataSource New5200 :ref:`DS_SetDataSource` sets the data file name and the channel names in the "Datasource" map of a dataset. .. function:: hMap = DS_SetDataSource(hData, ssNetCDFName, svChannels) hMap = DS_SetDataSource(hData, ssNetCDFName, svChannels, options) .. us.return **Return Value** The "Datasource" map of a dataset or 0, if an error occurred. .. us.params **Parameters** .. uparam:: hData *hData* is the dataset handle. .. uparam:: ssNetCDFName *ssNetCDFName* is the complete UniPlot data file name (.nc or .nc2). .. uparam:: svChannels *svChannels* is a vector with channel names. .. uparam:: options *options* is an object with key-value pairs. .. us.comment **Comment** If the function is invoked with 3 parameters, the following items will be created: .. list-table:: :header-rows: 0 * - NCFile * - DatasetType * - Channel If the *ssNetCDFName* file can be accessed, the following elements will be created: .. list-table:: :header-rows: 0 * - NCFileTime - * - Origin - * - OriginTime - * - units - * - CycleInfo - * - NumberOfPointsSource - * - DataFilter - If the function is invoked with 4 parameters and *options.ncid* is used to access the UniPlot data file. Other elements in *options* will be saved in the dataset map. Identical elements will be overwritten. The following elements can be set: .. list-table:: :header-rows: 0 * - FirstPoint * - NumberOfPoints * - AutoReload * - XSort .. us.example **Example** .. include:: ../include/test_DS_SetDataSource.ic .. us.history **History** .. list-table:: :header-rows: 1 * - Version - Description * - 5.20 - New. .. seealso:: :ref:`Overview-Data-File-Informations-for-Datasets` :ref:`XYCreate`, :ref:`DS_SetValue`, :ref:`DS_RemoveValue`, :ref:`XYReload`, :ref:`XYClip` :sub:`id-1238667`