*#
*#// start ElementActivityStep
*Intformat "%10i "
*#
*Set Var groupID=-1
*Set Var previousGroupID=-2
*Set Var nshells=0
*Set Var nbeam=0
*#
*#
*tcl(MyZapisElementGroupInactiveMaterialNumberReset)*\
*intformat "%d"
*If(IntvData(Show_Material_Activity,Int)==1)
*# // begin ElementActivityInterval
*for(adlc=1;adlc<=IntvData(Material_Activity_Step,Int);adlc=adlc+4)
*#
*# //  *krokVIntervalu ==? *IntvData(Material_Activity_Step,*Operation(adlc+3),Int) 
*If(krokVIntervaluActivity==IntvData(Material_Activity_Step,*Operation(adlc+3),Int))
*Set Var oMatUse=0
*#
*#
*loop materials *NotUsed *all
*#MatProp(0) *IntvData(Material_Activity_Step,*Operation(adlc+1))
*If(strcmp(MatProp(0),IntvData(Material_Activity_Step,*Operation(adlc+1)))==0)
*Set Var oMatUse=1
*#Set Var matvar=tcl(TK_FindMaterialNumber *IntvData(Material_Activity_Step,*Operation(adlc+1)) "ElementActivityInterval")
*#// MaxMatNum = - *MaxMatNum(int) -
*Set Var matvar=tcl(TK_PlusOne *MaxMatNum)
*Set Var MaxMatNum=tcl(TK_PlusOne *MaxMatNum)
*tcl(MyZapisElementGroupMaterialNumber *MatProp(0) *matvar )*\
*#// MaxMatNum = - *MaxMatNum(int) -
; 
*#// NOtUsed matvar = - *matvar -, MaxMatNum = *MaxMatNum   Mat = - *IntvData(Material_Activity_Step,*Operation(adlc+1)) -
*#
*#
*include ..\include.src.bas\MaterialFunctionAndParameters.bas
*include ..\include.src.bas\MaterialDefinition.bas
*#Set Var matvar=ElemsMat
*include ..\include.src.bas\MaterialGeometry.bas
*break
*EndIf
*End materials
*#
*If(oMatUse(Int)==0)
*loop materials *all
*# MatProp(0) *IntvData(Material_Activity_Step,*Operation(adlc+1))
*If(strcmp(MatProp(0),IntvData(Material_Activity_Step,*Operation(adlc+1)))==0)
*Set Var oMatUse=1
*#Set Var matvar=tcl(TK_FindMaterialNumber *IntvData(Material_Activity_Step,*Operation(adlc+1)) "ElementActivityInterval")
*Set Var matvar=tcl(TK_PlusOne *MaxMatNum)
*Set Var MaxMatNum=tcl(TK_PlusOne *MaxMatNum)
*tcl(MyZapisElementGroupMaterialNumber *MatProp(0) *matvar )
; 
*#// Used matvar = - *matvar -
*include ..\include.src.bas\MaterialFunctionAndParameters.bas
*include ..\include.src.bas\MaterialDefinition.bas
*break
*EndIf
*End materials
*EndIf
*EndIf
*End
*#
*tcl(MyZapisElementGroupInactiveReset)*\
*loop elems
*include ..\include.src.bas\CurrentElementgroupID.bas
*#
*#
*Set Var groupID(int)=Operation(ElemsMat*IncrMaterialID+CurrentType)
*#
*#
*#set var intervalnumber(int)=loopvar
*# //IntervalIndex = *IntervalIndex group iD = *groupID  krok v intervalu = *krokVIntervalu
*tcl(MyZapisElementGroupInactive *IntervalIndex *ElemsMatProp(0) *groupID *krokVIntervaluActivity)*\
*end elems
*tcl(MyZapisElementGroupInactiveReset)*\
*tcl(MyZapisElementGroupInactiveMaterialNumberReset)*\
*# // end_ElementActivityInterval
*EndIf
*#// end ElementActivityStep
*#// matvar = *matvar