function comp=getPara(comp,idx)
vars=extractfield(comp,'vars');
all_vars=[];
for i=1: length(vars)
    all_vars=[all_vars;vars{1,i}];
end
% get all non-repetitive parameters
indexp=all_vars(:,idx.vctg)=="para";
[~,ip,~]=unique(all_vars(indexp,idx.var)','stable');
comp_para.name='Para';
comp_para.children='';
vars_para=all_vars(ip);
vars_para(:,idx.pub)='out';
vars_para(:,idx.priv)='none';
comp_para.vars=vars_para;
comp=[comp,comp_para];
end