about your code
1-it doesn't has sense that the line that assign the material named "Dry MC" to the volumes 1 and 2 is inside the loop.
you are assigning again and again the same material to the same entities.
GiD_Process Mescape Data Materials AssignMaterial "Dry MC" Volumes 1 2 escape
2-you are setting the current field value 'y-direction' of a condition named 'Solid_Traction' to the values of the loop, but you are not assigning these current values to any entity, then are lost.
A GiD material is different of a GiD condition:
-each entity has one, and only one material (or id=0 to any). The entity points to the material (of a list of materials)
-you can change the values of a material and then all entities pointing this material have this new value.
-about conditions, each entity could be pointed by multiple conditions. If the condition is 'canrepeat=no' (default) then the same condition can't be applied to the same entity, the second assignment replace the previous one.
-Each assignation to an entity (geometry/mesh) store its own values, and cannot be modified. What you can do is to assign again the same condition with the new values to the same entity to replace the previous one (or if it is declared 'canrepeat=yes' must unassign and then assign the new one)