The staged construction settings and values for any Intrinsic properties of all UserFeatures (e.g. a load value for a line load, or a material assignment for a soil) are stored as a listable object per phase.
For instance, if you want to get the material assignment of a Soil_1_1 element in Phase_3, you can get the material object, and show the material name using these Python lines:
material = g_i.Soil_1_1.Material[g_i.Phase_3] print(material.Name.value)
Or, if you want to just show all material assignments for all soil objects:
for phase in g_i.Phases[:]: for soil in g_i.Soils[:]: print("{} in {}: {}".format( soil.Name.value, phase.Name.value, soil.Material[phase].Name.value ) )
You can use the Active property of a soil get to know if it is active or not in a phase:
active_state = g_i.Soil_1_1.Active[g_i.Phase_3] # True of False
To get a complete overview:
phase = g_i.Phase_3 for soil in g_i.Soils[:]: print("{} in {}: {} and Active={}".format( soil.Name.value, phase.Name.value, soil.Material[phase].Name.value, soil.Active[phase] ) )
To set a value for a staged construction setting, we can use this too. To set the vertical component of a point load Fy in Phase_3, you can use this:
g_i.PointLoad_1_1.Fy[g_i.Phase_3] = -10
For most Intrinsic Properties you can just follow the Selection Explorer:
Then you can use this:
g_i.Soil_1_1.Active[g_i.Phase_3] # gives boolean of active state of soil object for Phase_3 g_i.Soil_1_1.Material[g_i.Phase_3] # gives assigned material object for Phase_3 g_i.Soil_1_1.ApplyStrengthReduction[g_i.Phase_3] # gives boolean for Phase_3 g_i.Soil_1_1.WaterConditions # this is a UserFeature of the Soil object for water conditions g_i.Soil_1_1.WaterConditions.Active[g_i.Phase_3] # gives boolean if water is active for Phase_3 g_i.Soil_1_1.WaterConditions.Conditions[g_i.Phase_3] # gives number of water conditions option for Phase_3. E.g. value is 0, means global water level
The above examples are made with PLAXIS 2D 2017.00 and PLAXIS 3D 2016.02 using Python 3.4.x.
Using PLAXIS Remote scripting with the Python wrapper
[Tips and Tricks]
Identify Python commands from Plaxis command line
[Python Scripts]
Command line reference
Soil layer material assignment using Python