In order to create a custom connection in PLAXIS 3D Input program the following steps are needed (see also video):
- Select a beam or a plate
- Holding Ctrl+LMB multi-select the connecting plate (LMB=left-mouse button)
- RMB to open the popup window with options (RMB=right-mouse button)
- Select the option: Create a custom connection
Note that a custom connection is possible between two plates and between a beam and a plate. For more information please check our Reference manual.
The above procedure is easy and straightforward when only a few custom connections are to be defined. However, when many connections are to be created this starts becoming cumbersome (see attached video: Create custom connection with PLAXIS GUI).
With the selection API, this can be done even faster by directly clicking on the objects of interest one after the other and the Python script will do the rest (see attached video: Create custom connection with PLAXIS Python selection API):
The following should be considered about the code above:
- The script requires the existence of plates
- The code will run forever unless it is manually stopped due to the while-loop. The advantage of this while-loop, in this case, is that you can just let the script run while you conveniently just select all the connection parts without interruption.
- The code covers the cases that:
- No selection was made
- Only a selection of exactly 2 objects can occur to make the custom connection
- A custom connection already exists using a try-except statement
- The PlxScriptingError is the class that covers the different errors that can occur when using the Plaxis command line.
- To see all prerequisites, please refer to this article: Using PLAXIS Remote scripting with the Python wrapper
Usage instructions for Python script
To use this Python script:
- Download the file (use Save As...)
- Launch PLAXIS Input with a project with plates
- Make sure you are in Staged construction mode
- Open SciTE under Expert > Python > Editor...
- Open the custom_connection_selection_API.py file
- Select Tools > Go (or keyboard key F5)
- The Python script is running... Select two plates to make a custom connection.
- When finished select Tools > Stop executing (or keyboard keys Ctrl + Break)
Alternatively, the Python script can be run from the dedicated folder for Python tools in the installation directory. By default, this is at:
C:\Program Files\Bentley\Geotechnical\PLAXIS 3D CONNECT Edition V20\pytools\input
For older versions, this is:
C:\Program Files\Plaxis\Plaxis 3D\pytools\input
The Python script can then be found in PLAXIS Input Expert menu, under Python > Run Python tool.
Note that for this approach the boilerplate needs to be adjusted to:
s_i, g_i = new_server()
The script is tested with PLAXIS 3D 2018.01 and Python 3.4 using Tutorial 2 - Excavation in sand from the Plaxis Tutorial Manual.