Hello
I have being using the boilerplate the following e.g boilerplate up to V20.00 to run my API scripts using Spyder.
plaxis_path = r'C:\Program Files\Bentley\Geotechnical\PLAXIS 3D CONNECT Edition V20\python\Lib\site-packages'import imp
found_module = imp.find_module('plxscripting', [plaxis_path])plxscripting = imp.load_module('plxscripting', *found_module)from plxscripting.easy import *localhostport_input = 10000 localhostport_output = 10001 s, g = new_server('localhost', localhostport_input, password='B85H!ait8Hk7et2V')
s_output,g_output=new_server('localhost', localhostport_output, password='B85H!ait8Hk7et2V')
Ever since I update to V20.03, the found_module = imp.find_module('plxscripting', [plaxis_path]) don't work anymore since the all the relevant py files that was contained in the site-package folder don't longer exist in this new version
ImportError: No module named 'plxscripting'
Can you advise add modifications on the boilerplate above to make the API script working?
All the best and regards
Francisco
Dear Francisco,
Indeed, the boilerplate has changed some time ago, but since our last update releases inp module is removed as it is deprecated by Python itself in the new versions.
Please check the following article for the new boilerplate you can use:https://communities.bentley.com/products/geotech-analysis/w/plaxis-soilvision-wiki/46005/using-plaxis-remote-scripting-with-the-python-wrapper
To answer fast:
from plxscripting.easy import * s_i, g_i = new_server('localhost', 10000, password='yourpassword')