diff --git a/crpptbx/TCV_IMAS/tcv2ids.m b/crpptbx/TCV_IMAS/tcv2ids.m
index 1b5451d717bf3effde8aceecdb708ea23dc5cb82..00f7b7ca64401f8c5b6be30212c4eb6eff7594c6 100644
--- a/crpptbx/TCV_IMAS/tcv2ids.m
+++ b/crpptbx/TCV_IMAS/tcv2ids.m
@@ -13,6 +13,8 @@ function [ids_saved,varargout] = tcv2ids(shot,run,varargin);
 % varargin{1}: ids to load, by default all defined so far
 %             {'equilibrium', 'magnetics', 'pf_active','wall'} or a subset
 %
+% varargout{1}: return also the ids in array of structure with the names, to allow easy use of plotallids
+%
 
 % initialize input parser
 p = inputParser;
@@ -99,4 +101,10 @@ end
 %% Close the file
 imas_close(idx)
 
-
+if nargout>=2
+  for i=1:length(params_tcv2ids.ids_names)
+    ids_to_get = params_tcv2ids.ids_names{i};
+    varargout{1}.ids{i} = ids_saved.(ids_to_get);
+    varargout{1}.idsname{i} = ids_to_get;
+  end
+end