Bentley Communities
Bentley Communities
  • Site
  • User
  • Site
  • Search
  • User
  • Welcome
  • Products
  • Support
  • About
  • More
  • Cancel
PLAXIS | SOILVISION
  • Product Communities
  • More
PLAXIS | SOILVISION
PLAXIS | SOILVISION Wiki Access to Staged Construction settings using Python
    • Sign in
    • +Working from home with PLAXIS
    • Working from home with SOILVISION
    • -PLAXIS | SOILVISION Wiki
      • Geotechnical SELECT Entitlements [GSE]
      • -PLAXIS
        • PLAXIS CONNECT Edition and legacy versions
        • +License - PLAXIS
        • +PLAXIS Software downloads
        • +Release Notes PLAXIS 2D and PLAXIS 3D
        • +Manuals - PLAXIS
        • -API / Python scripting - PLAXIS
          • How to install additional Python modules in PLAXIS
          • Access to Staged Construction settings using Python
          • Automatic line cross-section chart generation using Python
          • Changing the material colour using Python scripting
          • Combined plate results in one chart using Python
          • Create custom connection with selection API
          • How to create a tunnel using Python
          • How to get a load - displacement curve using Scripting interface
          • Identify Python commands from Plaxis command line
          • Material lists in PLAXIS – Python
          • Output scripting example: create curve data
          • Output scripting example: get anchor force
          • Output scripting example: get heave of excavation bottom
          • Output scripting example: get maximum bending moment
          • Polycurves to Polygons in PLAXIS 2D using Python
          • Receive instant notifications for finished calculations on your phone
          • Retrieve coordinates of a Polygon in PLAXIS 2D using Python
          • Retrieving soil layer info from boreholes using Python
          • Scripting reference and how to use it
          • Selection API for PLAXIS Input
          • Soil layer material assignment using Python
          • Tunnel advancement script for PLAXIS 3D
          • User defined Python script (3D): Extract displacements by coordinates
          • Adding functionality to PLAXIS Calculation Manager: pre- and post-processing
          • Remove invalid custom connections for PLAXIS 3D
        • +Downloads - PLAXIS
        • +Known issues - PLAXIS
        • +Models - PLAXIS
        • +Publications
        • +Tips and Tricks
        • +Tutorials - PLAXIS
        • +Verifications - PLAXIS
        • +Videos - PLAXIS
      • +PLAXIS MoDeTo
      • +SOILVISION
      • +Subscription Entitlement Service

     
     Questions about this article, topic, or product? Click here. 

    Access to Staged Construction settings using Python

    Application PLAXIS 2D
    PLAXIS 3D
    Version PLAXIS 2D 2017
    PLAXIS 3D 2016
    Date created 23 August 2017
    Date modified 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.

    See also

    Using PLAXIS Remote scripting with the Python wrapper

    [Tips and Tricks]


    Identify Python commands from Plaxis command line

    [Python Scripts]


    Command line reference

    [Tips and Tricks]


    Soil layer material assignment using Python

    [Python Scripts]

    • activation
    • Plaxis 3D
    • python
    • API
    • py cookbook
    • Staged Construction
    • Automation
    • Scripting
    • PLAXIS
    • Remote scripting
    • cookbook
    • python cookbook
    • phase
    • PLAXIS 2D
    • Share
    • History
    • More
    • Cancel
    • Micha van der Sloot Created by Bentley Colleague Micha van der Sloot
    • When: Wed, Dec 18 2019 9:34 AM
    • Stefanos Papavasileiou Last revision by Bentley Colleague Stefanos Papavasileiou
    • When: Tue, Oct 13 2020 6:20 AM
    • Revisions: 3
    • Comments: 0
    Recommended
    Related
    Communities
    • Home
    • Getting Started
    • Community Central
    • Products
    • Support
    • Secure File Upload
    • Feedback
    Support and Services
    • Home
    • Product Support
    • Downloads
    • Subscription Services Portal
    Training and Learning
    • Home
    • About Bentley Institute
    • My Learning History
    • Reference Books
    Social Media
    •    LinkedIn
    •    Facebook
    •    Twitter
    •    YouTube
    •    RSS Feed
    •    Email

    © 2021 Bentley Systems, Incorporated  |  Contact Us  |  Privacy |  Terms of Use  |  Cookies