Selection API for PLAXIS Input

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.

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