Access to Staged Construction settings using Python

23 August 2017

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.

Material assignment

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
            )
        )

Active state

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]
        )
    )

Setting a value

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

General mapping Staged Construction parameters

For most Intrinsic Properties you can just follow the Selection Explorer:

General mapping Staged Construction parameters
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

Version

The above examples are made with PLAXIS 2D 2017.00 and PLAXIS 3D 2016.02 using Python 3.4.x.

Related posts

Privacy Preference Center

Necessary

The Cookies are necessary for the site to function

CONSENT, NID, _cfduid, wp-settings-time-16, wp-setting-16, wordpress_test_cookie, gdpr[allowed_cookies], gdpr[consent_types], wp_woocommerce_session, wordpress_logged_in, wordpress_sec, PHPSESSID

Advertising

These Cookies are used to provide you with useful information based on recent browser data

_gads
UserMatchHistory, lang, BizoID
IDE
fr
NID
lidc, bcookie

Analytics

These are used to track user interaction and detect potential problems. These help us improve our services by providing analytical data on how users use this site

_ga, _gid

Other