function [data,data_info,data_n,handles] = iduigetd(type)
%IDUIGETD Gets the desired active data set
%   TYPE: 'e' The Estimation data set is returned
%   TYPE: 'v' The Validation data set is returned
%   DATA: The data
%   DATA_INFO: The corresponding information matrix
%   DATA-N: The data name
%   handles: The handles [kax,klin,kname].

%   L. Ljung 4-4-94
%   Copyright 1986-2000 The MathWorks, Inc.
%   $Revision: 1.6 $  $Date: 2000/06/15 11:46:27 $

 Xsum = findobj(get(0,'children'),'flat','tag','sitb16');
XID = get(Xsum,'Userdata');

if type=='e',
   hax=XID.hw(3,1);
elseif type=='v',
    hax=XID.hw(4,1);
end

hnrdat=findobj(hax,'tag','selline');
hnrstr=findobj(hax,'tag','name');
data=get(hnrdat,'UserData');
data_info = iduiinfo('get',data);%get(hnrstr,'UserData');
data_n = pvget(data,'Name');%get(hnrstr,'String');
handles=[hax,hnrdat,hnrstr];
