*Intformat "%10i "
*#
*Set Var groupID=-1
*Set Var previousGroupID=-2
*Set Var nshells=0
*Set Var nbeam=0
*#
*#*Set Cond Elements_Activity_for_Surface  *elems  *CanRepeat
*#*Add Cond Elements_Activity_for_Line   *elems  *CanRepeat
*#*If(ndime==3)
*#*Add Cond Elements_Activity_for_Volume   *elems  *CanRepeat
*#*EndIf
*If(CondNumEntities(Int)>0)
// selection has *CondNumEntities entities
//----------------------------------------------------------------------------
//                              ELEMENT ACTIVITY
//----------------------------------------------------------------------------
*loop elems *OnlyInCond
*Set Var EActivity=Operation(EActivity+1)
*#
*include ..\include.src.bas\CurrentElementgroupID.bas
*#
*Set Var groupID=Operation(ElemsMat*IncrMaterialID+CurrentType)
*If(strcmp(ElemsMatProp(Material_Prototype),"CCReinforcement")==0 || strcmp(ElemsMatProp(Material_Prototype),"CCDiscreteReinforcementME")==0 || strcmp(ElemsMatProp(Material_Prototype),"CCCyclingReinforcement")==0 || strcmp(ElemsMatProp(Material_Prototype),"CCSmearedReinf")==0)
// reinforcement
*Set Var groupID = Operation(InitCablesID+Cond(Entity_number,Int))
*Set Var myEntity_number = Cond(Entity_number,Int)
MACRO_ELEMENT *myEntity DELETE ;
*EndIf
*If(strcmp(Cond(1),"CREATE_WITH_NEW_MAT")==0)
*#
*# groupID *previousGroupID *Cond(Assign_material)
*If(groupID != previousGroupID)
*Set Var oMatUse=0
*loop materials *NotUsed *all
*#loop materials *NotUsed 
*# MatProp(0) *Cond(Assign_material)
*If(strcmp(MatProp(0),Cond(Assign_material))==0)
*Set Var oMatUse=1
*Set Var matvar=ElemsMat
;
*include ..\include.src.bas\MaterialFunctionAndParameters.bas
*include ..\include.src.bas\MaterialDefinition.bas
*break
*EndIf
*End materials
*#
*If(oMatUse(Int)==0)
*loop materials *all
*#loop materials *NotUsed 
*# MatProp(0) *Cond(Assign_material)
*If(strcmp(MatProp(0),Cond(Assign_material))==0)
*Set Var oMatUse=1
*Set Var matvar=ElemsMat
;
*include ..\include.src.bas\MaterialFunctionAndParameters.bas
*include ..\include.src.bas\MaterialDefinition.bas
*break
*EndIf
*End materials
*endif

*If(oMatUse(Int)==1)
*WarningBox Info: Assigned material of Condition Element Activity was written...
*EndIf

*# GEOMETRY ID *ElemsMat // NAME "Interactive Geometry #*Operation(nmats+IntervalIndex)" 
*Set Var oMatUse=0
*loop materials *NotUsed *all
*#loop materials *NotUsed
*# ////// zjisteni kvadratic
*Set Var MaterialQuadratic=ElemsMatProp(Non-Quadratic_Element,Int)
*Set Var JeQuadratic = IsQuadratic(Int)
*If(MaterialQuadratic==1)
*Set Var JeQuadratic = 0
*EndIf
*# ////// zjisteni kvadratic end
*If(strcmp(MatProp(0),Cond(Assign_material))==0)
*Set Var oMatUse=1
*Set Var matvar=ElemsMat
*include ..\include.src.bas\MaterialGeometry.bas
*break
*EndIf
*End materials
*#
*include ..\include.src.bas\CurrentElementgroupID.bas
*#
*tcl(TK_WriteElementType2Activity *Cond(Assign_material) *ElemsType *ElemsNnode *AddTranspAnalysis *groupID)
*#include ..\include.src.bas\ElementType2Activity.bas
*#
 ELEMENT GROUP ID *groupID TYPE *groupID /** Original matl:*ElemsMatProp(0)/*ElemsMatProp(1) - *CurrentType **/ MATERIAL *ElemsMat GEOMETRY *ElemsMat
 ELEMENT INCIDENCES
// *ElemsMatProp(0) *ElemsMatProp(1)
*EndIf
*#
*include ..\include.src.bas\ElementConectivities.bas
*#
*Set Var previousGroupID=groupID
*Set Var nEActivity=Operation(nEActivity+1)
*EndIf
*End elems

*# pro deskove prvky je nyni nutne zapsat PREPARE_CALCULATION flag
*Set Var groupID=-1
*Set Var previousGroupID=-2
*Set Var nshells=0
*Set Var nbeam=0
*loop elems *OnlyInCond
*include ..\include.src.bas\CurrentElementgroupID.bas
*If(groupID != previousGroupID)
*tcl(TK_WriteShellPrepareCalculation *Cond(Assign_material) *ElemsType *ElemsNnode *AddTranspAnalysis *groupID)
*Set Var previousGroupID=groupID
*EndIf
*End elems
*#
//----------------------------------------------------------------------------
//                              ELEMENT ACTIVITY END
//----------------------------------------------------------------------------
*EndIf
