%%%
%
%
%%%
function template = selectTemplate(projectdir)
template = [];
templatesdir = [projectdir, filesep, 'Templates'];
[a, projectname, c, d] = fileparts(projectdir);
d = dir([templatesdir, filesep, '*.temp_dat']);
templates = {d.name};
[s,v] = listdlg('Name', 'Select Template', 'PromptString', ['Select a template for project ', projectname], 'SelectionMode','single', 'ListString',templates, 'ListSize', [600 200]);
if isempty(s)
    return;
end
template = templates{s};
return;