*Set Var nPrestress1D=0
*Set Var LastGroupID=0
*#
*Set Cond Prestressing_for_Reinf_Line *elems 
*If(CondNumEntities(Int)>0)
// selection has *CondNumEntities entities
*Set Var nshells=0
*Set Var nbeam=0
*loop elems *OnlyInCond
*If(Cond(Apply_in_Subincrement,int)==ApplyInSubincrement  || strcmp(GenData(Calculation_Analysis),"Static")==0) 
*If(ElemsType==1)
*#
*If(ElemsMatProp(Embedded_Reinforcement,Int)==0)
*#
*If(strcmp(ElemsMatProp(Geometrical_Non-Linearity),"LINEAR")==0)
*Set Var CurrentType=Operation(ElemsNnode*1)
*Else
*Set Var CurrentType=Operation(ElemsNnode+AddingNonLinElemID)
*EndIf
*Set Var groupID=Operation(ElemsMat*IncrMaterialID+CurrentType)
*#
*Else
*Set Var groupID=Operation(InitCablesID+Cond(Entity_number,Int))
*EndIf
*If(LastGroupID!=groupID)
*#If(Cond(1,Int)!=0)
*#If(Cond(Value,Int)!=0)
*# 
*Set Var oMujFnc=tcl(TK_FindMaterialNumber *Cond(FUNCTION_for_prestress) "Prestressing_for_Reinf_Line")
*Format "LOAD PRESTRESSING GROUP %i %s %20.10f"
*groupID *Cond(DIRECTION) *Cond(X-Value,Real)
*#
*# *Set Var oMujFnc=tcl(TK_FindMaterialNumber *Cond(FUNCTION_for_prestress) "Prestressing_for_Reinf_Line")
*# *Set Var oMujFnc=Operation(25250000+oMujFnc)
*# *Format "LOAD PRESTRESSING GROUP %i DIRECTION %s VALUE_FNC %i"
*# *groupID *Cond(DIRECTION) *oMujFnc
*Set Var nPrestress1D=Operation(nPrestress1D+1)
*#EndIf
*EndIf
*Set Var LastGroupID=groupID
*EndIf
*EndIf
*End elems
*EndIf
*#
*#
*#
