function import(ViewerObj)
%IMPORT  Open system-import GUI for LTI Viewer

%   Author(s): A. DiVergilio
%   Copyright 1986-2000 The MathWorks, Inc. 
%   $Revision: 1.2 $  $Date: 2000/06/14 20:03:12 $

%---Build system list (from workspace)
WorkspaceVars = evalin('base','whos');
ltivars = zeros(size(WorkspaceVars));
size_str = cell(size(WorkspaceVars));
for ct=1:size(WorkspaceVars,1)
   VarClass=WorkspaceVars(ct).class;
   if any(strcmpi(VarClass,{'ss';'tf';'zpk';'frd'}))
      ltivars(ct)=ct;
      if isequal(length(WorkspaceVars(ct).size),2)
         s = mat2str(WorkspaceVars(ct).size);
         s = strrep(s,' ','x');
         size_str{ct} = s(2:end-1);
      else
         size_str{ct} = [num2str(length(WorkspaceVars(ct).size)),'-D'];
      end
   end
end
WorkspaceVars = WorkspaceVars(find(ltivars));
AllNames = strvcat(WorkspaceVars.name);
MaxName = size(AllNames,2);
NameBlanks = repmat(max(0,blanks(15-MaxName)),size(AllNames,1),1);
AllSize = strvcat(size_str(find(ltivars)));
MaxSize = size(AllSize,2);
SizeBlanks = repmat(max(0,blanks(13-MaxSize )),size(AllSize,1),1);
AllClass = strvcat(WorkspaceVars.class);
ListStr = [AllNames,char(NameBlanks),AllSize,char(SizeBlanks),AllClass];

%---Update status bar and open GUI
status(ViewerObj,'Select the systems to import...');
ltibrowse('import',ViewerObj.Handle,ListStr,cellstr(AllNames))
