PLAXIS boilerplate code change? 2D and 3D V20.03

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

Parents Reply Children
No Data