*#
*# begin block For surface Max monitor
*#
*tcl(TK_InitSurfaceCriteria 0 0 0 0 0 0 0 0 0) *\
*#
*# pri prvnim pruchodu naplnim pole SurfaceList(List_of_Monitored_Surfaces)
*#                                  UniqueSurfaceList(Surfacec_Index)
*#                                  AttributeList(Data_Attributes)
*#                                  MinMaxList(Minimum_or_Maximum)
*#				    CheckName(Use_MonitorName)
*#				    MonitorName(Name)
*#				    UniqueMonitorName
*#
*# WarningBox Warning: pred 1.pruchodem loop Intervals a TK_C.A.C.Info
*loop Intervals
*Set Cond MaxMonitor_for_Surface *nodes  *CanRepeat
*If(CondNumEntities(Int)>0)
*#
*loop nodes *OnlyInCond
*# sn  *Cond(Entity_number,int)
*# dei *Cond(Draw_Each_Iteration,int)
*# ia  *Cond(Item_At,int)
*# da  *Cond(Data_Attribute)
*# g   *Cond(Global_MM)
*#  *Cond(Data_Attribute) *Cond(Global_MM) *Cond(Item_At,int) *Cond(Draw_Each_Iteration,int) *Cond(Entity_number,int)
*tcl(TK_CreateSurfaceArraysCriteriaInfo *Cond(Data_Attribute) *Cond(Global_MM) *Cond(Item_At) *Cond(Draw_Each_Iteration,int) *Cond(Entity_number,int) *Cond(IdentificationByName,int) *Cond(MonitorName))*\
*#
*End nodes
*#
*# // Monitors identify by name of monitor 
*If(GenData(SurfaceList,1,Int)>0)
*for(i=1;i<=GenData(UniqueMonitorName,Int);i=i+1)
*Set Var first=1
*for(j=1;j<=GenData(MonitorName,Int);j=j+1)
*# --------
*# i=*i
*# --------
*# *GenData(UniqueMonitorName,*i)
*# *GenData(MonitorName,*j)
*# *GenData(CheckName,*j,Int)
*# *first
*# --------
*#
*If(strcmp(GenData(UniqueMonitorName,*i),GenData(MonitorName,*j))==0 && GenData(CheckName,*j,Int)==1 && first==1)
*Set Var first=0
OUTPUT LOCATION OUTPUT_DATA DATA LIST *\
*#
*If(Cond(Draw_Each_Iteration,Int)==1)
"MONITOR_SET_1_*\
*Else
"MONITOR_SET_2_*\
*EndIf
*GenData(UniqueMonitorName,*i)*\
*If(strcmp(GenData(MinMaxList,*j),"MAXIMUM")==0 || strcmp(GenData(MinMaxList,*j),"MINIMUM")==0)
_*GenData(MinMaxList,*j)*\
*EndIf
_*GenData(AttributeList,*j)_DIR_*GenData(Item_At,*j)" End ;
*#
*EndIf
*#
*End
*End
*EndIf
*#
*# // Monitors identify by Makroelement ID *GenData(CheckName,1,Int)
*For(i=1;i<=GenData(SurfaceList,Int);i=i+1)
*#
*If(GenData(CheckName,*i,Int)==0)
*Set Var nMaxMonitor=Operation(nMaxMonitor+1)
OUTPUT LOCATION OUTPUT_DATA DATA LIST *\
*#
*If(Cond(Draw_Each_Iteration,Int)==1)
"MONITOR_SET_1_*\
*Else
"MONITOR_SET_2_*\
*EndIf
*GenData(MonitorName,*i)*\
*If(strcmp(GenData(MinMaxList,*i),"MAXIMUM")==0 || strcmp(GenData(MinMaxList,*i),"MINIMUM")==0)
_*GenData(MinMaxList,*i)*\
*EndIf
_Surf*GenData(SurfaceList,*i,int)_*GenData(AttributeList,*i)_DIR_*GenData(Item_At,*i)" End ;
*EndIf
*#
*End
*#
*EndIf
*#
*break
*End Intervals
*#
*# End block For surface Max monitor
*#
*tcl(TK_InitSurfaceCriteria 0 0 0 0 0 0 0 0 0) *\
