GenerateMaterial_Sandwich3D *GenData(sw_AssignMaterialToMacroelem,Int)
*If(GenData(sw_AssignMaterialToMacroelem,Int)==1)
*#
*Set Var IndexMacroelement=0
*Set Var SandwicIndex=0
*Set Var catalogue=1
*#
*If(strcmp(GenData(Predefined_Structure),"Simple_Panel")==0)
*# BE
*Set Var IndexMacroelement=1
*Set Var SandwicIndex=1
*# include ..\include.src.bas\Assign_Material_Sandwich3D.bas
*tcl(Assign_Material_for_one_Sandwich3D *IndexMacroelement)
*ElseIf(strcmp(GenData(Predefined_Structure),"Simple_Frame_Panel")==0)
*# CE
*# CF
*# BF
*Set Var IndexMacroelement=1
*Set Var SandwicIndex=1
*# for(j=1;j<=3;j=j+1)
*# include ..\include.src.bas\Assign_Material_Sandwich3D.bas
*# End
*tcl(Assign_Default_Material_for_Advanced_Frame *IndexMacroelement 3)
*ElseIf(strcmp(GenData(Predefined_Structure),"Simple_Window_Panel")==0)
*# AD
*# BD
*# CD
*# AE
*# CE
*# AF
*# BF
*# CF
*Set Var IndexMacroelement=1
*Set Var SandwicIndex=1
*# for(j=1;j<=8;j=j+1)
*# include ..\include.src.bas\Assign_Material_Sandwich3D.bas
*# End
*tcl(Assign_Default_Material_for_Advanced_Frame *IndexMacroelement 8)
*ElseIf(strcmp(GenData(Predefined_Structure),"Advanced_Frame_Panel")==0)
*#
*Set Var SandwicIndex=1
*#
*Set Var IndexMacroelement=1
*# BF
*tcl(Assign_Default_Material_for_Advanced_Frame *IndexMacroelement 28)
*Set Var IndexMacroelement=29
*# CE
*tcl(Assign_Default_Material_for_Advanced_Frame *IndexMacroelement 84)
*Set Var IndexMacroelement=85
*# CF
*tcl(Assign_Default_Material_for_Advanced_Frame *IndexMacroelement 148)
*#
*# je traba assignovat materialy pro 
*# V3zduch a 
*If(GenData(Adhesive_Whole_Layer,Int)==0)
*tcl(Assign_Aire_Material_for_Advanced_Frame )
*EndIf
*# pro ruzne Vyztuziuzeni pod omitkou
*tcl(Assign_Reinforcing_And_Adhesive_for_Advanced_Frame )
*#
*Else
*MessageBox error: Type requested structure For Material Assignment is not defined!
*Set Var catalogue=0
*EndIf
*If(catalogue==1)
*tcl(sw_SetInternalVariable "sw_AssignMaterialToMacroelem" 0)
*EndIf
*#
*Else
*MessageBox error: The Materials has already been assign it!
*EndIf