*# ApplyInSubIncrement is Option For Creep code
*#
*If(CondNumEntities(Int)>0)
      // selection has *CondNumEntities entities
*# LOAD CASE ID *nSupport NAME "Supports for Load Step #*nSupport"
*loop nodes *OnlyInCond
*#
*# Cond(Apply_in_Subincrement,int)=*Cond(Apply_in_Subincrement,int) ApplyInSubincrement=*ApplyInSubincrement
*If(Cond(Apply_in_Subincrement,int)==ApplyInSubincrement  || strcmp(GenData(Calculation_Analysis),"Static")==0) 
*#
*# Cond(Coordinate_System)
*If(strcmp(Cond(Coordinate_System),"GLOBAL")==0)
*#
*If(Cond(X-Rotation-Constraint,Int)==1)
SUPPORT SIMPLE node *NodesNum dof 4 /** *Cond(Coordinate_System) **/ VALUE 0.0
*Set Var nSupport=Operation(nSupport+1)
*EndIf
*If(Cond(Y-Rotation-Constraint,Int)==1)
SUPPORT SIMPLE node *NodesNum dof 5 /** *Cond(Coordinate_System) **/ VALUE 0.0
*Set Var nSupport=Operation(nSupport+1)
*EndIf
*If(Cond(Z-Rotation-Constraint,Int)==1)
SUPPORT SIMPLE node *NodesNum dof 6 /** *Cond(Coordinate_System) **/ VALUE 0.0
*Set Var nSupport=Operation(nSupport+1)
*EndIf
*#
*ElseIf(strcmp(Cond(Coordinate_System),"INCLINED")==0)
*# Cond(Multiplier_for_Dof_1_f1,Real)
*# Operation(1.0*fabs(Cond(Multiplier_for_Dof_1_f1,Real)))
*#
*# // If Coordinate system is LOCAL
*Set Var omaxabsvals=Operation(1.0*fabs(Cond(Multiplier_for_Dof_4_f4,Real)))
*Set Var omaxabsvals2=Operation(1.0*(Cond(Multiplier_for_Dof_4_f4,Real)))
*If(omaxabsvals>0.0)
*Set Var multipls=Operation(1.0/omaxabsvals)
*Set Var multipls2=Operation(1.0/omaxabsvals2)
*Set Var omaxabsdofs=4
*EndIf
*#
*If(omaxabsvals<Operation(1.0*fabs(Cond(Multiplier_for_Dof_5_f5,Real))))
*Set Var omaxabsvals=Operation(1.0*fabs(Cond(Multiplier_for_Dof_5_f5,Real)))
*Set Var omaxabsvals2=Operation(1.0*(Cond(Multiplier_for_Dof_5_f5,Real)))
*Set Var multipls=Operation(1.0/omaxabsvals)
*Set Var multipls2=Operation(1.0/omaxabsvals2)
*Set Var omaxabsdofs=6
*EndIf
*If(omaxabsvals<Operation(1.0*fabs(Cond(Multiplier_for_Dof_6_f6,Real))))
*Set Var omaxabsvals=Operation(1.0*fabs(Cond(Multiplier_for_Dof_6_f6,Real)))
*Set Var omaxabsvals2=Operation(1.0*(Cond(Multiplier_for_Dof_6_f6,Real)))
*Set Var multipls=Operation(1.0/omaxabsvals)
*Set Var multipls2=Operation(1.0/omaxabsvals2)
*Set Var omaxabsdofs=6
*EndIf
*#
*If(omaxabsdofs==4)
SUPPORT COMPLEX master node *\
*If(Cond(Multiplier_for_Dof_5_f5,Real)!=0.0 && Cond(Multiplier_for_Dof_5_f5,Real)!=0)
 *NodesNum DOF 5 ** *Operation(multipls2*Cond(Multiplier_for_Dof_5_f5,Real)) *\
*EndIf
*If(Cond(Multiplier_for_Dof_6_f6,Real)!=0.0 && Cond(Multiplier_for_Dof_63_f6,Real)!=0)
 *NodesNum DOF 6 ** *Operation(multipls2*Cond(Multiplier_for_Dof_6_f6,Real)) *\ 
*EndIf
slave node *NodesNum dof 4 VALUE  0.0
*Set Var nSupport=Operation(nSupport+1)
*ElseIf(omaxabsdofs==5)
SUPPORT COMPLEX master node *\
*If(Cond(Multiplier_for_Dof_4_f4,Real)!=0.0 && Cond(Multiplier_for_Dof_4_f4,Real)!=0)
 *NodesNum DOF 4 ** *Operation(multipls2*Cond(Multiplier_for_Dof_4_f4,Real)) *\
*EndIf
*If(Cond(Multiplier_for_Dof_6_f6,Real)!=0.0 && Cond(Multiplier_for_Dof_6_f6,Real)!=0)
 *NodesNum DOF 6 ** *Operation(multipls2*Cond(Multiplier_for_Dof_6_f6,Real)) *\
*EndIf
slave node *NodesNum dof 5 VALUE  0.0
*Set Var nSupport=Operation(nSupport+1)
*ElseIf(omaxabsdofs==6)
SUPPORT COMPLEX master node *\
*If(Cond(Multiplier_for_Dof_4_f4,Real)!=0.0 && Cond(Multiplier_for_Dof_4_f4,Real)!=0)
 *NodesNum DOF 4 ** *Operation(multipls2*Cond(Multiplier_for_Dof_4_f4,Real)) *\
*EndIf
*If(Cond(Multiplier_for_Dof_5_f5,Real)!=0.0 && Cond(Multiplier_for_Dof_5_f5,Real)!=0)
 *NodesNum DOF 5 ** *Operation(multipls2*Cond(Multiplier_for_Dof_5_f5,Real)) *\
*EndIf
slave node *NodesNum dof 6 VALUE  0.0
*Set Var nSupport=Operation(nSupport+1)
*EndIf
*#
*ElseIf(strcmp(Cond(Coordinate_System),"INCLINED_LINE")==0)
*# Cond(Multiplier_for_Dof_1_f1,Real)
*# Operation(1.0*fabs(Cond(Multiplier_for_Dof_1_f1,Real)))
*#
*# // If Coordinate system is LOCAL LINE
*#                   
*If(Cond(Master_dof,Int)==4)
SUPPORT COMPLEX master node *NodesNum DOF 4 ** *Operation(-1.0*Cond(Line_Multiplier_for_Dof_5_f5,Real)/Cond(Line_Multiplier_for_Dof_4_f4,Real)) slave node *NodesNum dof 5 VALUE  0.0
SUPPORT COMPLEX master node *NodesNum DOF 4 ** *Operation(-1.0*Cond(Line_Multiplier_for_Dof_6_f6,Real)/Cond(Line_Multiplier_for_Dof_4_f4,Real)) slave node *NodesNum dof 6 VALUE  0.0
*Set Var nSupport=Operation(nSupport+1)
*ElseIf(Cond(Master_dof,Int)==5)
SUPPORT COMPLEX master node *NodesNum DOF 5 ** *Operation(-1.0*Cond(Line_Multiplier_for_Dof_4_f4,Real)/Cond(Line_Multiplier_for_Dof_5_f5,Real)) slave node *NodesNum dof 4 VALUE  0.0
SUPPORT COMPLEX master node *NodesNum DOF 5 ** *Operation(-1.0*Cond(Line_Multiplier_for_Dof_6_f6,Real)/Cond(Line_Multiplier_for_Dof_5_f5,Real)) slave node *NodesNum dof 6 VALUE  0.0
*Set Var nSupport=Operation(nSupport+1)
*ElseIf(Cond(Master_dof,Int)==6)
SUPPORT COMPLEX master node *NodesNum DOF 6 ** *Operation(-1.0*Cond(Line_Multiplier_for_Dof_4_f4,Real)/Cond(Line_Multiplier_for_Dof_6_f6,Real)) slave node *NodesNum dof 4 VALUE  0.0
SUPPORT COMPLEX master node *NodesNum DOF 6 ** *Operation(-1.0*Cond(Line_Multiplier_for_Dof_5_f5,Real)/Cond(Line_Multiplier_for_Dof_6_f6,Real)) slave node *NodesNum dof 5 VALUE  0.0
*Set Var nSupport=Operation(nSupport+1)
*EndIf
*#
*Else
 // error in condition Constraint_for_* in question Coordinate_System
*EndIf
*#
*EndIf
*#
*End nodes
*EndIf
