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 Selection API for PLAXIS Input
    • 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. 

    Selection API for PLAXIS Input

    Application PLAXIS 2D
    PLAXIS 3D
    Version PLAXIS 2D 2019
    PLAXIS 3D 2018
    Date created 27 June 2019
    Date modified 27 June 2019

    In PLAXIS Input it is very common to use the mouse to perform actions. It is typical to select a point load to activate or multi-select polygons to assign a material data set. In this workflow, the selection of such Plaxis objects is important for the Input program.

    With Python scripting, it is now possible to take advantage of the interactive selection of objects and pass them to the scripting layer for further usage.

    The new feature is called selection and it allows to “integrate” with the PLAXIS Input program. With the selection API, you can access any selected entities which allows for even more automated procedures to be implemented.

    How it works

    In a Python script or the interpreter, you can access any selected-by-mouse entities using following:
    g_i.selection

    For example, the following allows printing the name of the geometric objects selected by mouse:

    for item in g_i.selection: 
        print(item.Name) 
    

    selection_API_for_PLAXIS_Input_example

    Note that the selection is an object which is in between a list and a set in Python: it cannot contain duplicate items, but it is ordering-sensitive. The order of the selected items may influence the commands to be executed following the rules of the native Plaxis command line.

    The selection object behaves as a list in the Plaxis scripting environment.

    Examples

    To find an example of the selection API, follow the Related posts below.

    See also

    Create custom connection with selection API

    [Python Scripts]

    • Plaxis 3D
    • python
    • API
    • py cookbook
    • Input
    • Automation
    • Scripting
    • PLAXIS
    • Remote scripting
    • cookbook
    • selection
    • python cookbook
    • PLAXIS 2D
    • Share
    • History
    • More
    • Cancel
    • Micha van der Sloot Created by Bentley Colleague Micha van der Sloot
    • When: Wed, Dec 18 2019 9:33 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