.. highlightlang:: us .. index:: PageGetAllDatasets .. _pagegetalldatasets: PageGetAllDatasets ================== .. us.tag PageGetAllDatasets ENGLISH PageGet Changed5149 :ref:`PageGetAllDatasets` returns a vector with the handles of all datasets of the given page. .. function:: hvData = PageGetAllDatasets(hPage) hvData = PageGetAllDatasets(hPage, bOnlyVisible) hvData = PageGetAllDatasets(hPage, bOnlyVisible, ssType) .. us.return **Return Value** *hvData* is a vector with dataset handles. If a page does not contain any datasets the function returns the value 0. .. us.params **Parameters** .. uparam:: hPage Identifies the page. .. uparam:: bOnlyVisible If *bOnlyVisible* is TRUE (1) only the visible datasets are returned. See also :ref:`XYIsVisible` or :ref:`XYZIsVisible`. Default value is FALSE (0). .. uparam:: ssType If *ssType* is "OBJ_XYZDATASET" the function returns only 3D datasets. If *ssType* is "OBJ_XYDATASET" the function returns only 1D and 2D datasets. If *ssType* is an empty string the function returns all datasets. Default value is "". .. us.example **Example** Create a list of all used channels in the active document. :: RegisterCommand("2D-Dataset", "_list_used_channel_names", "Create Used Channel Name List"); UserBar_Add("_list_used_channel_names"); def _list_used_channel_names() { hDoc = AppGetActiveDocument(); if (hDoc == 0) { return; } svChannel = ""; hvPage = DocGetAllPages(hDoc, FALSE, FALSE); for (hPage in hvPage) { hvData = PageGetAllDatasets(hPage, FALSE); if (hvData[1] != 0) { for (hData in hvData) { svC = DS_GetChannelNames(hData); if (svC[1] != "") { svChannel = [svChannel, svC]; } } } } svChannel = ST_set(svChannel); ssText = strcat(svChannel, "\n"); hEdit = EdCreate(); EdSetText(hEdit, "Used Channel Names:\n" + ssText); EdSetModify(hEdit, TRUE); } .. us.history **History** .. list-table:: :header-rows: 1 * - Version - Description * - R2012.10 - New parameter *ssType* added. * - 5.14.9 - New parameter *bOnlyVisible*. .. seealso:: :ref:`overview-document-pages`, :ref:`PageGetSelectedDataLayer`, :ref:`GetParent`, :ref:`PageCreate`, :ref:`DocGetAllPages`, :ref:`PageGetAllLayers`, :ref:`LayerGetAllDatasets` :sub:`id-374603`