Application | PLAXIS 3D |
Version | PLAXIS 3D 2018 |
Date created | 27 June 2019 |
Date modified | 27 June 2019 |
In order to create a custom connection in PLAXIS 3D Input program the following steps are needed (see also video):
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):
from plxscripting.plx_scripting_exceptions import PlxScriptingError print('Python script running...') while True: sel_objs = g_i.selection[:] if not sel_objs: pass # nothing selected else: if len(sel_objs) == 2: try: g_i.connection(*sel_objs) g_i.selection = [] # empty the selection except PlxScriptingError: print('Connection already exists. Choose next objects or quit.') g_i.selection = [] # empty the selection pass # command failed so back to the while-loop else: pass # continue the while-loop until two items are selected
The following should be considered about the code above:
To use this Python script:
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.