function CstDefineMaterialDefault(fid,CName,CType,CEpsilon,CMue,CKappa,CTanD,...
    CTanDFreq,CTanDGiven,CTanDModel,CKappaM,CTanDM,CTanDMFreq,CTanDMGiven,...
    CDispModelEps,CDispModelMue,CRho,CThermal,CColA,CColB,CColC,CWireframe,CTransparency)

global mws material;

%  .Reset
%  .Name "Copper"
% .FrqType "static" 
% .Type "Normal" 
% .Epsilon "1" 
% .Mue "1.0" 
% .Kappa "5.8e+007" 
% .TanD "0.0" 
% .TanDFreq "0.0" 
% .TanDGiven "False" 
% .TanDModel "ConstTanD" 
% .KappaM "0" 
% .TanDM "0.0" 
% .TanDMFreq "0.0" 
% .TanDMGiven "False" 
% .TanDMModel "ConstTanD" 
% .DispModelEps "None" 
% .DispModelMue "None" 
% .DispersiveFittingSchemeEps "General 1st" 
% .DispersiveFittingSchemeMue "General 1st" 
% .UseGeneralDispersionEps "False" 
% .UseGeneralDispersionMue "False" 
% .FrqType "all" 
% .Type "Lossy metal" 
% .Mue "1.0" 
% .Kappa "5.8e+007" 
% .Rho "0.0" 
% .ThermalType "Normal" 
% .ThermalConductivity "401.0" 
% .Colour "1", "1", "0" 
% .Wireframe "False" 
% .Transparency "0" 
% .Create

% Operace s 3d objektem
fprintf(fid, '%% Definovani materialu\n');
fprintf(fid, 'material=mws.invoke(''Material'');\n');
fprintf(fid, 'material.invoke(''Reset'');\n');
fprintf(fid, ['material.invoke(''Name'',''',CName,''');\n']);
fprintf(fid, 'material.invoke(''FrqType'',''all'');\n');
fprintf(fid, ['material.invoke(''Type'',''',CType,''');\n']);
fprintf(fid, ['material.invoke(''Epsilon''',',',num2str(CEpsilon),');\n']);
fprintf(fid, ['material.invoke(''Mue''',',',num2str(CMue),');\n']);
fprintf(fid, ['material.invoke(''Kappa''',',',num2str(CKappa),');\n']);
fprintf(fid, ['material.invoke(''TanD''',',',num2str(CTanD),');\n']);
fprintf(fid, ['material.invoke(''TanDFreq''',',',num2str(CTanDFreq),');\n']);
fprintf(fid, ['material.invoke(''TanDGiven'',''',CTanDGiven,''');\n']);
fprintf(fid, ['material.invoke(''TanDModel'',''',CTanDModel,''');\n']);
fprintf(fid, ['material.invoke(''KappaM''',',',num2str(CKappaM),');\n']);
fprintf(fid, ['material.invoke(''TanDM''',',',num2str(CTanDM),');\n']);
fprintf(fid, ['material.invoke(''TanDMFreq''',',',num2str(CTanDMFreq),');\n']);
fprintf(fid, ['material.invoke(''TanDMGiven'',''',CTanDMGiven,''');\n']);
fprintf(fid, ['material.invoke(''DispModelEps'',''',CDispModelEps,''');\n']);
fprintf(fid, ['material.invoke(''DispModelMue'',''',CDispModelMue,''');\n']); 
fprintf(fid, 'material.invoke(''DispersiveFittingSchemeEps'',''General 1st'');\n'); 
fprintf(fid, 'material.invoke(''DispersiveFittingSchemeMue'',''General 1st'');\n'); 
fprintf(fid, 'material.invoke(''UseGeneralDispersionEps'',''False'');\n'); 
fprintf(fid, 'material.invoke(''UseGeneralDispersionMue'',''False'');\n'); 
fprintf(fid, ['material.invoke(''Rho''',',',num2str(CRho),');\n']);
fprintf(fid, ['material.invoke(''ThermalConductivity''',',',num2str(CThermal),');\n']); 
fprintf(fid, 'material.invoke(''SetActiveMaterial'',''all'');\n'); 
fprintf(fid, ['material.invoke(''Colour''',',',num2str(CColA),',',num2str(CColB),',',num2str(CColC),');\n']);
fprintf(fid, ['material.invoke(''Wireframe'',''',CWireframe,''');\n']);
fprintf(fid, ['material.invoke(''Transparency''',',',num2str(CTransparency),');\n']);
fprintf(fid, 'material.invoke(''Create'');\n\n'); 
%CstMaterial(fid,'Copper','Normal',1,1.0,5.8e+007,0,0.0,...
%0.0,False,ConstTanD,None,None,1.0,,'ConstTanD',0,0,0,'False','None','None')

% definovani materialu: FR-4 (loss free)

material  = mws.invoke('Material');
     material.invoke('Reset');
     material.invoke('Name',CName);
     material.invoke('FrqType','all');
     material.invoke('Type',CType); 
     material.invoke('Epsilon',CEpsilon); 
     material.invoke('Mue',CMue); 
     material.invoke('Kappa',CKappa); 
     material.invoke('TanD',CTanD); 
     material.invoke('TanDFreq',CTanDFreq); 
     material.invoke('TanDGiven',CTanDMGiven); 
     material.invoke('TanDModel',CTanDModel); 
     material.invoke('KappaM',CKappaM); 
     material.invoke('TanDM',CTanDM); 
     material.invoke('TanDMFreq',CTanDMFreq); 
     material.invoke('TanDMGiven',CTanDMGiven); 
     material.invoke('TanDMModel','ConstTanD'); 
     material.invoke('DispModelEps',CDispModelEps); 
     material.invoke('DispModelMue',CDispModelMue); 
     material.invoke('DispersiveFittingSchemeEps','General 1st'); 
     material.invoke('DispersiveFittingSchemeMue','General 1st'); 
     material.invoke('UseGeneralDispersionEps','False'); 
     material.invoke('UseGeneralDispersionMue','False'); 
     material.invoke('Rho',CRho); 
     material.invoke('ThermalConductivity',CThermal); 
     material.invoke('SetActiveMaterial','all'); 
     material.invoke('Colour',CColA,CColB,CColC); 
     material.invoke('Wireframe',CWireframe); 
     material.invoke('Transparency',CTransparency); 
     material.invoke('Create'); 
end