<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://communities.bentley.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Bulk processing Plaxis results from multiple files</title><link>https://communities.bentley.com/products/geotech-analysis/f/forum/245168/bulk-processing-plaxis-results-from-multiple-files</link><description>I have written a Python file to export plaxis results. Now I want to use it for multiple files. 
 I tried to run it in the command line: 
 
 &amp;quot;C:\Program Files\Seequent\PLAXIS 2D 2023.1\Plaxis2DOutput.exe&amp;quot; --AppServerPassword=YOURPASSWORD --AppServerPort</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Bulk processing Plaxis results from multiple files</title><link>https://communities.bentley.com/thread/765458?ContentTypeID=1</link><pubDate>Fri, 12 May 2023 12:32:49 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:2107fc29-4329-43bf-bdff-b1144c0e9c76</guid><dc:creator>Stefanos Papavasileiou</dc:creator><description>&lt;p&gt;Hello Zhenhe,&lt;/p&gt;
&lt;p&gt;Any reason why not running it from any Python IDE, such as SciTE we deliver?&lt;/p&gt;
&lt;p&gt;Your code can be like the following:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="python"&gt;import subprocess

# setting constants
plx_input_path = r&amp;quot;C:\Program Files\Seequent\PLAXIS 2D 2023.1\Plaxis2DXInput.exe&amp;quot;
plx_output_path = r&amp;quot;C:\Program Files\Seequent\PLAXIS 2D 2023.1\Plaxis2DOutput.exe&amp;quot;
plx_input_port = 10000
plx_output_port = 10001
plx_pass = r&amp;#39;YOUR_PASSWORD&amp;#39;

# launch PLAXIS application with port and password
plx_i = subprocess.Popen([plx_input_path,
                          &amp;quot;--AppServerPort={}&amp;quot;.format(plx_input_port),
                          &amp;quot;--AppServerPassword={}&amp;quot;.format(plx_pass)])

# Launch Output program
plx_o = subprocess.Popen([plx_output_path,
                          &amp;quot;@&amp;quot;,
                          &amp;quot;--AppServerPort={}&amp;quot;.format(plx_output_port),
                          &amp;quot;--AppServerPassword={}&amp;quot;.format(plx_pass)])

# boilerplate for Plaxis remote scripting server
from plxscripting.easy import *
s_i, g_i = new_server(&amp;#39;localhost&amp;#39;, plx_input_port, password=plx_pass)
s_o, g_o = new_server(&amp;#39;localhost&amp;#39;, plx_output_port, password=plx_pass)

projects_to_run = [r&amp;#39;D:\Projects\Project_1.p2dx&amp;#39;, r&amp;#39;D:\Projects\Project_2.p2dx&amp;#39;, r&amp;#39;D:\Projects\Project_3.p2dx&amp;#39;]

# for-loop that has code that will run for all projects; here projects are in a list
for project in projects_to_run:
    print(&amp;#39;Running: {}&amp;#39;.format(project))
    s_i.open(project)
    g_i.Project.echo()  # command for Input
    g_i.view(g_i.Phases[-1])
    print(g_o.getresults(g_o.Phases[-1], g_o.ResultTypes.Soil.Uy, &amp;#39;node&amp;#39;)[-1])  # command for Output
    s_i.close()
    s_o.close()

plx_i.terminate()    
plx_o.terminate()    
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;If you want to use a different Python file per project, then it can be that the Command Prompt you are launching is not using the &lt;em&gt;python.exe&lt;/em&gt; we deliver but another one you have installed on your PC.&lt;/p&gt;
&lt;p&gt;I would recommend that you navigate to the PLAXIS Python distribution we deliver and start the Command Prompt via the&amp;nbsp;&lt;em&gt;pycmd.bat&lt;/em&gt; (batch file) we have created:&lt;br /&gt;C:\ProgramData\Seequent\PLAXIS Python Distribution V2\python\&lt;em&gt;pycmd.bat&lt;/em&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>