*Intformat "%10i "
*#
*Set Var groupID=-1
*Set Var previousGroupID=-2
*Set Var previousGroupID2=-2
*Set Var previousGroupID3=-2
*Set Var previousGroupID4=-2
*Set Var previousGroupID5=-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 DELETE
//----------------------------------------------------------------------------
*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),"INACTIVE")==0)
*#        SELECTION "DEACTIVE_*ElemsNum(Int)" LIST *ElemsNum *Cond(1) GROUP *groupID  // "Cond Elements_Activity #*nEActivity(Int)/*EActivity(Int)"
*# ElseIf(strcmp(Cond(1),"ACTIVE")==0)
*#        SELECTION "ACTIVE_*ElemsNum(Int)"   LIST *ElemsNum *Cond(1) GROUP *groupID  // "Cond Elements_Activity #*nEActivity(Int)/*EActivity(Int)"
*If(strcmp(Cond(1),"DELETE")==0)
*If(groupID!=previousGroupID && groupID!=previousGroupID2 && groupID!=previousGroupID3 && groupID!=previousGroupID4 && groupID!=previousGroupID5)
DELETE ENFORCED ELEMENT GROUP *groupID ;
*#DELETE ENFORCED ELEMENT TYPE *groupID
*#Set Var matvar=ElemsMat
*#include ..\include.src.bas\DeleteMaterialElementActivity.bas

*Set Var previousGroupID5=previousGroupID4
*Set Var previousGroupID4=previousGroupID3
*Set Var previousGroupID3=previousGroupID2
*Set Var previousGroupID2=previousGroupID
*Set Var previousGroupID=groupID

*#Else
*#//	SELECTION "DELETE_*ElemsNum(Int) Elements_Activity" LIST *ElemsNum(Int) ENFORCED DELETE GROUP *groupID(Int)
*EndIf
*EndIf
*End elems

*#
//----------------------------------------------------------------------------
//                              ELEMENT ACTIVITY DELETE END
//----------------------------------------------------------------------------
*EndIf
