<?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/"><channel><title>Combined plate results in one chart using Python</title><link>https://communities.bentley.com/products/geotech-analysis/w/wiki/45457/combined-plate-results-in-one-chart-using-python</link><description /><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>Combined plate results in one chart using Python</title><link>https://communities.bentley.com/products/geotech-analysis/w/wiki/45457/combined-plate-results-in-one-chart-using-python</link><pubDate>Tue, 15 Feb 2022 11:11:02 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:5040fd36-6d8e-44d1-b6a1-eaba107391c9</guid><dc:creator>Stefanos Papavasileiou</dc:creator><comments>https://communities.bentley.com/products/geotech-analysis/w/wiki/45457/combined-plate-results-in-one-chart-using-python#comments</comments><description>Current Revision posted to GeoStudio | PLAXIS Wiki by Stefanos Papavasileiou on 2/15/2022 11:11:02 AM&lt;br /&gt;
&lt;div class="content-scrollable-wrapper" style="border-collapse:collapse;overflow:auto;padding-bottom:30px;"&gt;
&lt;table style="background-color:#fffff;border:#56aa1c 0px solid;border-width:1px 0px 0px 0px;width:500px;" border="0"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td style="border-bottom:#56aa1c 1px solid;padding:4px 5px 4px 50px;text-align:right;"&gt;&lt;strong&gt;Application&lt;/strong&gt;&lt;/td&gt;
&lt;td style="border-bottom:#56aa1c 1px solid;padding:4px 5px 4px 50px;text-align:left;"&gt;PLAXIS 2D&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="border-bottom:#56aa1c 1px solid;padding:4px 5px 4px 50px;text-align:right;"&gt;&lt;strong&gt;Version&lt;/strong&gt;&lt;/td&gt;
&lt;td style="border-bottom:#56aa1c 1px solid;padding:4px 5px 4px 50px;text-align:left;"&gt;PLAXIS 2D 2017&lt;br /&gt;PLAXIS 2D CONNECT Edition&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="border-bottom:#56aa1c 1px solid;padding:4px 5px 4px 50px;text-align:right;"&gt;&lt;strong&gt;Date created&lt;/strong&gt;&lt;/td&gt;
&lt;td style="border-bottom:#56aa1c 1px solid;padding:4px 5px 4px 50px;text-align:left;"&gt;30 May 2017&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="border-bottom:#56aa1c 1px solid;padding:4px 5px 4px 50px;text-align:right;"&gt;&lt;strong&gt;Date modified&lt;/strong&gt;&lt;/td&gt;
&lt;td style="border-bottom:#56aa1c 1px solid;padding:4px 5px 4px 50px;text-align:left;"&gt;18 January 2022&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;tbody&gt;&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;h3&gt;&lt;span style="font-weight:400;"&gt;A Python script combining forces and displacements for a single wall into a plot and table&lt;/span&gt;&lt;/h3&gt;
&lt;h1&gt;Introduction&lt;/h1&gt;
&lt;p&gt;In order to retrieve and document results for retaining walls (vertical plates) in PLAXIS 2D Output, several plots and tables need to be inspected and copied separately. For instance:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;A plot for the horizontal displacements (u&lt;sub&gt;x&lt;/sub&gt;)&lt;/li&gt;
&lt;li&gt;A plot for the axial forces (N)&lt;/li&gt;
&lt;li&gt;A plot for the bending moments (M)&lt;/li&gt;
&lt;li&gt;A table for the displacements ( |u|, u&lt;sub&gt;x&lt;/sub&gt;, u&lt;sub&gt;y&lt;/sub&gt;)&lt;/li&gt;
&lt;li&gt;A table for the forces (N, Q, and M)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;When copying this data for many phases, this can be a lot of work, and is prone to human error, e.g. by taking the wrong phase or by forgetting to press Ctrl+C when inspecting a table.&lt;/p&gt;
&lt;h1&gt;Python solution&lt;/h1&gt;
&lt;p&gt;By using the Remote Scripting Server in the Plaxis Output program, we can create a Python script to automatically retrieve the desired displacements and forces for a certain vertical plate. The attached script will ask the user to define the X-coordinate for the vertical plate and to define for which phase the results should be obtained.&lt;/p&gt;
&lt;p&gt;The Python script will then:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Gather the plate results and filter them based on the X-coordinate&lt;/li&gt;
&lt;li&gt;Create a table of these results and copy this table to the Windows clipboard (tab-delimited). This can then easily be pasted into a spreadsheet program.&lt;/li&gt;
&lt;li&gt;Generate a chart, showing the wall with the results for horizontal displacement (u&lt;sub&gt;x&lt;/sub&gt;), axial force (N) and bending moment (M) in one chart.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Script output - table&lt;/h2&gt;
&lt;p&gt;The resulting table will be copied to the clipboard to be used in e.g. a spreadsheet program. It will contain a header with info on the phase the results are for and for which X-coordinate the results are taken, followed by the actual data table. The data is stored as tab-separated values.&lt;/p&gt;
&lt;p&gt;Based on the final phase of &lt;a href="/products/geotech-analysis/w/plaxis-soilvision-wiki/45557/"&gt;Tutorial Lesson 2&lt;/a&gt;, this table will look like this:&lt;/p&gt;
&lt;div style="background:#f3f3f3;border:solid grey;border-width:.1em .1em .1em .8em;overflow:auto;padding:.2em .6em;width:auto;"&gt;
&lt;pre style="color:#000;font-family:&amp;#39;Lucida Console&amp;#39;,Consolas, Inconsolata,&amp;#39;DejaVu Sans Mono&amp;#39;, Monaco, &amp;#39;Courier New&amp;#39;, monospace;font-size:13px;line-height:120%;margin:2px;overflow:auto;padding:5px;white-space:pre;"&gt;PLAXIS 2D Result script: Plate results
For phase: Third excavation stage [Phase_5]
Step number: Step_24
Vertical plate at X = 50.0 m

X    Y      u_x                  u_y                   |u|                 N                      Q                    M                      rotation
[m]  [m]    [m]                  [m]                   [m]                 [kN/m]                 [kN/m]               [kNm/m]                [&amp;deg;]
50   20     0.0224266240723166   -0.00775284541048889  0.0237288870206748  -0.000503572077390047   0.0171521096654468   2.87346535454702e-13  0.480217532450464
50   19.75  0.0245219323623862   -0.00775279974664634  0.0257183022514521  -2.76566870972096      -1.16857362594199    -0.114778674602701     0.480218001424812
50   19.5   0.0266170992800733   -0.00775265919316243  0.0277231617722547  -5.69441776254759      -3.73654034658163    -0.699885794686862     0.480223070463705
50   19.25  0.028712053956832    -0.00775241824433458  0.029740242619305   -8.79201320755032      -7.67343619438683    -2.09749667300932      0.480241927766234
50   19     0.0308067771926515   -0.00775207114821604  0.031767154862919   -12.0637175217222      -12.965949311491     -4.64903832929917      0.480288664180428
&lt;em&gt;[...]&lt;/em&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;h2&gt;Script output - plot&lt;/h2&gt;
&lt;p&gt;The Python script will define a &lt;em&gt;&lt;strong&gt;matplotlib&lt;/strong&gt;&lt;/em&gt;-chart with one vertical axis for the plate and three horizontal axes: u_x, N and M. This chart is based on &lt;a href="http://matplotlib.org/examples/axes_grid/demo_parasite_axes2.html"&gt;the parasites example from Matplotlib&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Based on the final phase of &lt;a href="/products/geotech-analysis/w/plaxis-soilvision-wiki/45557/"&gt;Tutorial Lesson 2&lt;/a&gt;, this chart will look like this:&lt;/p&gt;
&lt;p&gt;&lt;img class="aligncenter size-beast-medium wp-image-9065" alt="Python generated plot showing combined results for displacements and forces" src="/cfs-file/__key/communityserver-wikis-components-files/00-00-00-05-58/python_5F00_script_5F00_chart_5F00_2D_5F00_wall_5F00_uNM_2D00_600x600.png" /&gt;&lt;/p&gt;
&lt;p style="text-align:center;"&gt;&lt;em&gt;Figure 1. Python generated plot showing combined results for displacements and forces for Tutorial Lesson 2&amp;#39;s final phase.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Note: this Python script will directly use the data from the PLAXIS Output program. The only exception is for the horizontal displacement u&lt;sub&gt;x&lt;/sub&gt;: when the SI unit for length [m] is used, the deformation values for the curve data are converted to [mm] to improve the reading of the generated graph.&lt;/p&gt;
&lt;h2&gt;Modules used&lt;/h2&gt;
&lt;p&gt;The Python script requires the following modules:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The &lt;em&gt;&lt;strong&gt;plxscripting&lt;/strong&gt;&lt;/em&gt; module to interact with PLAXIS 2D Output&lt;/li&gt;
&lt;li&gt;The &lt;em&gt;&lt;strong&gt;matplotlib&lt;/strong&gt;&lt;/em&gt; module to create a chart&lt;/li&gt;
&lt;li&gt;The &lt;em&gt;&lt;strong&gt;pyperclip&lt;/strong&gt;&lt;/em&gt; module to copy the content to the Windows clipboard&lt;/li&gt;
&lt;li&gt;The &lt;em&gt;&lt;strong&gt;easygui&lt;/strong&gt;&lt;/em&gt; module to create a nice user interface for the user to set values in order to retrieve results: the X-coordinate of the vertical plate and the phase to retrieve the results for.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;All modules are part of the standard PLAXIS 2D 2017 installation that includes a full Python 3.4.x distribution.&lt;/p&gt;
&lt;h2&gt;Usage instructions for Python script&lt;/h2&gt;
&lt;p&gt;To use this file:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Download the file (use Save As...)&lt;/li&gt;
&lt;li&gt;Unpack the zip file and copy the *.py file to this folder:&lt;br /&gt;&amp;lt;PLAXIS 2D installation folder&amp;gt;\pytools\output&lt;br /&gt;By default the installation folder for PLAXIS 2D is:&lt;br /&gt;C:\Program Files\Bentley\Geotechnical\PLAXIS 2D CONNECT Edition V20\&lt;br /&gt;For older versions, this is:&lt;br /&gt;C:\Program Files\Plaxis\Plaxis 2D\&lt;/li&gt;
&lt;li&gt;Restart PLAXIS 2D Output and open a Plaxis file with an activated retaining wall (vertical plate)&lt;/li&gt;
&lt;li&gt;In the Expert menu, go to Python &amp;gt; Run script &amp;gt; Tools. Here you should see the name of the Python file. When selecting it, it will execute the script to retrieve the results for the plate:&lt;br /&gt;&amp;bull; &amp;nbsp;As a table in the Windows clipboard&lt;br /&gt;&amp;bull; &amp;nbsp;Followed by generation of the chart&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;When you do not have access rights to add the script in this folder, alternatively, you can choose to use Expert menu &amp;gt; Python &amp;gt; Run script &amp;gt; Open... to manually open and run the file.&lt;/p&gt;
&lt;h2&gt;Version&lt;/h2&gt;
&lt;p&gt;The current version of the script is V1.1.&lt;br /&gt;This script has been made for PLAXIS 2D 2017.00 using Python 3.4.x&lt;br /&gt;The script has been tested with PLAXIS 2D CONNECT Edition V20 and V21.&lt;/p&gt;
&lt;h2&gt;Disclaimer&lt;/h2&gt;
&lt;p&gt;&lt;em&gt;This Python script is made available as a service to PLAXIS users and can only be used in combination with a Bentley Geotechnical SELECT Entitlement [GSE] (former PLAXIS-VIP) license.&lt;/em&gt;&lt;br /&gt;&lt;em&gt;You use this Python script at your own responsibility and you are solely responsible for its results and the use thereof. Plaxis does not accept any responsibility nor liability for the use of this Python script nor do we provide support &lt;/em&gt;on&lt;em&gt; its use.&lt;/em&gt;&lt;/p&gt;
&lt;div&gt;
&lt;h4&gt;Downloads&lt;/h4&gt;
&lt;ul style="color:#56aa1c;list-style-type:square;padding-bottom:5px;"&gt;
&lt;li&gt;&lt;a href="/cfs-file/__key/communityserver-wikis-components-files/00-00-00-05-58/combined_5F00_plate_5F00_result_5F00_one_5F00_chart_5F00_using_5F00_python_5F00_v1_5F00_1.py"&gt;[Python script] Combined plate result in one chart V1.1&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: bending moment, bending, python, pytool, API, App, Automation, Scripting, PLAXIS, table, deflection, plot, matplotlib, tool, PLAXIS 2D, pyapp&lt;/div&gt;
</description></item><item><title>Combined plate results in one chart using Python</title><link>https://communities.bentley.com/products/geotech-analysis/w/wiki/45457/combined-plate-results-in-one-chart-using-python/revision/5</link><pubDate>Fri, 03 Dec 2021 09:30:31 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:5040fd36-6d8e-44d1-b6a1-eaba107391c9</guid><dc:creator>Micha van der Sloot</dc:creator><comments>https://communities.bentley.com/products/geotech-analysis/w/wiki/45457/combined-plate-results-in-one-chart-using-python#comments</comments><description>Revision 5 posted to GeoStudio | PLAXIS Wiki by Micha van der Sloot on 12/3/2021 9:30:31 AM&lt;br /&gt;
&lt;div class="content-scrollable-wrapper" style="border-collapse:collapse;overflow:auto;padding-bottom:30px;"&gt;
&lt;table style="background-color:#fffff;border:#56aa1c 0px solid;border-width:1px 0px 0px 0px;width:500px;" border="0"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td style="border-bottom:#56aa1c 1px solid;padding:4px 5px 4px 50px;text-align:right;"&gt;&lt;strong&gt;Application&lt;/strong&gt;&lt;/td&gt;
&lt;td style="border-bottom:#56aa1c 1px solid;padding:4px 5px 4px 50px;text-align:left;"&gt;PLAXIS 2D&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="border-bottom:#56aa1c 1px solid;padding:4px 5px 4px 50px;text-align:right;"&gt;&lt;strong&gt;Version&lt;/strong&gt;&lt;/td&gt;
&lt;td style="border-bottom:#56aa1c 1px solid;padding:4px 5px 4px 50px;text-align:left;"&gt;PLAXIS 2D 2017&lt;br /&gt;PLAXIS 2D CONNECT Edition&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="border-bottom:#56aa1c 1px solid;padding:4px 5px 4px 50px;text-align:right;"&gt;&lt;strong&gt;Date created&lt;/strong&gt;&lt;/td&gt;
&lt;td style="border-bottom:#56aa1c 1px solid;padding:4px 5px 4px 50px;text-align:left;"&gt;30 May 2017&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="border-bottom:#56aa1c 1px solid;padding:4px 5px 4px 50px;text-align:right;"&gt;&lt;strong&gt;Date modified&lt;/strong&gt;&lt;/td&gt;
&lt;td style="border-bottom:#56aa1c 1px solid;padding:4px 5px 4px 50px;text-align:left;"&gt;07 October 2021&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;tbody&gt;&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;!--mce:protected %3C%21--mce%3Aprotected%20%253C%2521--%25u2013%25u2013%2520end%2520of%2520Bentley%2520header%2520%25u2013%25u2013--%253E--%3E--&gt;
&lt;h3&gt;&lt;span style="font-weight:400;"&gt;A Python script combining forces and displacements for a single wall into a plot and table&lt;/span&gt;&lt;/h3&gt;
&lt;h1&gt;Introduction&lt;/h1&gt;
&lt;p&gt;In order to retrieve and document results for retaining walls (vertical plates) in PLAXIS 2D Output, several plots and tables need to be inspected and copied separately. For instance:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;A plot for the horizontal displacements (u&lt;sub&gt;x&lt;/sub&gt;)&lt;/li&gt;
&lt;li&gt;A plot for the axial forces (N)&lt;/li&gt;
&lt;li&gt;A plot for the bending moments (M)&lt;/li&gt;
&lt;li&gt;A table for the displacements ( |u|, u&lt;sub&gt;x&lt;/sub&gt;, u&lt;sub&gt;y&lt;/sub&gt;)&lt;/li&gt;
&lt;li&gt;A table for the forces (N, Q, and M)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;When copying this data for many phases, this can be a lot of work, and is prone to human error, e.g. by taking the wrong phase or by forgetting to press Ctrl+C when inspecting a table.&lt;/p&gt;
&lt;h1&gt;Python solution&lt;/h1&gt;
&lt;p&gt;By using the Remote Scripting Server in the Plaxis Output program, we can create a Python script to automatically retrieve the desired displacements and forces for a certain vertical plate. The attached script will ask the user to define the X-coordinate for the vertical plate and to define for which phase the results should be obtained.&lt;/p&gt;
&lt;p&gt;The Python script will then:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Gather the plate results and filter them based on the X-coordinate&lt;/li&gt;
&lt;li&gt;Create a table of these results and copy this table to the Windows clipboard (tab-delimited). This can then easily be pasted into a spreadsheet program.&lt;/li&gt;
&lt;li&gt;Generate a chart, showing the wall with the results for horizontal displacement (u&lt;sub&gt;x&lt;/sub&gt;), axial force (N) and bending moment (M) in one chart.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Script output - table&lt;/h2&gt;
&lt;p&gt;The resulting table will be copied to the clipboard to be used in e.g. a spreadsheet program. It will contain a header with info on the phase the results are for and for which X-coordinate the results are taken, followed by the actual data table. The data is stored as tab-separated values.&lt;/p&gt;
&lt;p&gt;Based on the final phase of &lt;a href="/products/geotech-analysis/w/plaxis-soilvision-wiki/45557/"&gt;Tutorial Lesson 2&lt;/a&gt;, this table will look like this:&lt;/p&gt;
&lt;div style="background:#f3f3f3;border:solid grey;border-width:.1em .1em .1em .8em;overflow:auto;padding:.2em .6em;width:auto;"&gt;
&lt;pre style="color:#000;font-family:&amp;#39;Lucida Console&amp;#39;,Consolas, Inconsolata,&amp;#39;DejaVu Sans Mono&amp;#39;, Monaco, &amp;#39;Courier New&amp;#39;, monospace;font-size:13px;line-height:120%;margin:2px;overflow:auto;padding:5px;white-space:pre;"&gt;PLAXIS 2D Result script: Plate results
For phase: Third excavation stage [Phase_5]
Step number: Step_24
Vertical plate at X = 50.0 m

X    Y      u_x                  u_y                   |u|                 N                      Q                    M                      rotation
[m]  [m]    [m]                  [m]                   [m]                 [kN/m]                 [kN/m]               [kNm/m]                [&amp;deg;]
50   20     0.0224266240723166   -0.00775284541048889  0.0237288870206748  -0.000503572077390047   0.0171521096654468   2.87346535454702e-13  0.480217532450464
50   19.75  0.0245219323623862   -0.00775279974664634  0.0257183022514521  -2.76566870972096      -1.16857362594199    -0.114778674602701     0.480218001424812
50   19.5   0.0266170992800733   -0.00775265919316243  0.0277231617722547  -5.69441776254759      -3.73654034658163    -0.699885794686862     0.480223070463705
50   19.25  0.028712053956832    -0.00775241824433458  0.029740242619305   -8.79201320755032      -7.67343619438683    -2.09749667300932      0.480241927766234
50   19     0.0308067771926515   -0.00775207114821604  0.031767154862919   -12.0637175217222      -12.965949311491     -4.64903832929917      0.480288664180428
&lt;em&gt;[...]&lt;/em&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;h2&gt;Script output - plot&lt;/h2&gt;
&lt;p&gt;The Python script will define a &lt;em&gt;&lt;strong&gt;matplotlib&lt;/strong&gt;&lt;/em&gt;-chart with one vertical axis for the plate and three horizontal axes: u_x, N and M. This chart is based on &lt;a href="http://matplotlib.org/examples/axes_grid/demo_parasite_axes2.html"&gt;the parasites example from Matplotlib&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Based on the final phase of &lt;a href="/products/geotech-analysis/w/plaxis-soilvision-wiki/45557/"&gt;Tutorial Lesson 2&lt;/a&gt;, this chart will look like this:&lt;/p&gt;
&lt;p&gt;&lt;img class="aligncenter size-beast-medium wp-image-9065" alt="Python generated plot showing combined results for displacements and forces" src="/cfs-file/__key/communityserver-wikis-components-files/00-00-00-05-58/python_5F00_script_5F00_chart_5F00_2D_5F00_wall_5F00_uNM_2D00_600x600.png" /&gt;&lt;/p&gt;
&lt;p style="text-align:center;"&gt;&lt;em&gt;Figure 1. Python generated plot showing combined results for displacements and forces for Tutorial Lesson 2&amp;#39;s final phase.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Note: this Python script will directly use the data from the PLAXIS Output program. The only exception is for the horizontal displacement u&lt;sub&gt;x&lt;/sub&gt;: when the SI unit for length [m] is used, the deformation values for the curve data are converted to [mm] to improve the reading of the generated graph.&lt;/p&gt;
&lt;h2&gt;Modules used&lt;/h2&gt;
&lt;p&gt;The Python script requires the following modules:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The &lt;em&gt;&lt;strong&gt;plxscripting&lt;/strong&gt;&lt;/em&gt; module to interact with PLAXIS 2D Output&lt;/li&gt;
&lt;li&gt;The &lt;em&gt;&lt;strong&gt;matplotlib&lt;/strong&gt;&lt;/em&gt; module to create a chart&lt;/li&gt;
&lt;li&gt;The &lt;em&gt;&lt;strong&gt;pyperclip&lt;/strong&gt;&lt;/em&gt; module to copy the content to the Windows clipboard&lt;/li&gt;
&lt;li&gt;The &lt;em&gt;&lt;strong&gt;easygui&lt;/strong&gt;&lt;/em&gt; module to create a nice user interface for the user to set values in order to retrieve results: the X-coordinate of the vertical plate and the phase to retrieve the results for.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;All modules are part of the standard PLAXIS 2D 2017 installation that includes a full Python 3.4.x distribution.&lt;/p&gt;
&lt;h2&gt;Usage instructions for Python script&lt;/h2&gt;
&lt;p&gt;To use this file:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Download the file (use Save As...)&lt;/li&gt;
&lt;li&gt;Unpack the zip file and copy the *.py file to this folder:&lt;br /&gt;&amp;lt;PLAXIS 2D installation folder&amp;gt;\pytools\output&lt;br /&gt;By default the installation folder for PLAXIS 2D is:&lt;br /&gt;C:\Program Files\Bentley\Geotechnical\PLAXIS 2D CONNECT Edition V20\&lt;br /&gt;For older versions, this is:&lt;br /&gt;C:\Program Files\Plaxis\Plaxis 2D\&lt;/li&gt;
&lt;li&gt;Restart PLAXIS 2D Output and open a Plaxis file with an activated retaining wall (vertical plate)&lt;/li&gt;
&lt;li&gt;In the Expert menu, go to Python &amp;gt; Run script &amp;gt; Tools. Here you should see the name of the Python file. When selecting it, it will execute the script to retrieve the results for the plate:&lt;br /&gt;&amp;bull; &amp;nbsp;As a table in the Windows clipboard&lt;br /&gt;&amp;bull; &amp;nbsp;Followed by generation of the chart&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;When you do not have access rights to add the script in this folder, alternatively, you can choose to use Expert menu &amp;gt; Python &amp;gt; Run script &amp;gt; Open... to manually open and run the file.&lt;/p&gt;
&lt;h2&gt;Version&lt;/h2&gt;
&lt;p&gt;This script has been made for PLAXIS 2D 2017.00 using Python 3.4.x&lt;br /&gt;The script has been tested with PLAXIS 2D CONNECT Edition V20 and V21.&lt;/p&gt;
&lt;h2&gt;Disclaimer&lt;/h2&gt;
&lt;p&gt;&lt;em&gt;This Python script is made available as a service to PLAXIS users and can only be used in combination with a Bentley Geotechnical SELECT Entitlement [GSE] (former PLAXIS-VIP) license.&lt;/em&gt;&lt;br /&gt;&lt;em&gt;You use this Python script at your own responsibility and you are solely responsible for its results and the use thereof. Plaxis does not accept any responsibility nor liability for the use of this Python script nor do we provide support &lt;/em&gt;on&lt;em&gt; its use.&lt;/em&gt;&lt;/p&gt;
&lt;div&gt;
&lt;h4&gt;Downloads&lt;/h4&gt;
&lt;ul style="color:#56aa1c;list-style-type:square;padding-bottom:5px;"&gt;
&lt;li&gt;&lt;a href="/cfs-file/__key/communityserver-wikis-components-files/00-00-00-05-58/5582.combined_5F00_plate_5F00_result_5F00_one_5F00_chart_5F00_using_5F00_python.py"&gt;[Python script] Combined plate result in one chart&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: bending moment, bending, python, pytool, API, App, Automation, Scripting, PLAXIS, table, deflection, plot, matplotlib, tool, PLAXIS 2D, pyapp&lt;/div&gt;
</description></item><item><title>Combined plate results in one chart using Python</title><link>https://communities.bentley.com/products/geotech-analysis/w/wiki/45457/combined-plate-results-in-one-chart-using-python/revision/4</link><pubDate>Thu, 07 Oct 2021 09:55:35 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:5040fd36-6d8e-44d1-b6a1-eaba107391c9</guid><dc:creator>Stefanos Papavasileiou</dc:creator><comments>https://communities.bentley.com/products/geotech-analysis/w/wiki/45457/combined-plate-results-in-one-chart-using-python#comments</comments><description>Revision 4 posted to GeoStudio | PLAXIS Wiki by Stefanos Papavasileiou on 10/7/2021 9:55:35 AM&lt;br /&gt;
&lt;div class="content-scrollable-wrapper" style="border-collapse:collapse;overflow:auto;padding-bottom:30px;"&gt;
&lt;table style="background-color:#fffff;border:#56aa1c 0px solid;border-width:1px 0px 0px 0px;width:500px;" border="0"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td style="border-bottom:#56aa1c 1px solid;padding:4px 5px 4px 50px;text-align:right;"&gt;&lt;strong&gt;Application&lt;/strong&gt;&lt;/td&gt;
&lt;td style="border-bottom:#56aa1c 1px solid;padding:4px 5px 4px 50px;text-align:left;"&gt;PLAXIS 2D&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="border-bottom:#56aa1c 1px solid;padding:4px 5px 4px 50px;text-align:right;"&gt;&lt;strong&gt;Version&lt;/strong&gt;&lt;/td&gt;
&lt;td style="border-bottom:#56aa1c 1px solid;padding:4px 5px 4px 50px;text-align:left;"&gt;PLAXIS 2D 2017&lt;br /&gt;PLAXIS 2D CONNECT Edition&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="border-bottom:#56aa1c 1px solid;padding:4px 5px 4px 50px;text-align:right;"&gt;&lt;strong&gt;Date created&lt;/strong&gt;&lt;/td&gt;
&lt;td style="border-bottom:#56aa1c 1px solid;padding:4px 5px 4px 50px;text-align:left;"&gt;30 May 2017&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="border-bottom:#56aa1c 1px solid;padding:4px 5px 4px 50px;text-align:right;"&gt;&lt;strong&gt;Date modified&lt;/strong&gt;&lt;/td&gt;
&lt;td style="border-bottom:#56aa1c 1px solid;padding:4px 5px 4px 50px;text-align:left;"&gt;07 October 2021&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;tbody&gt;&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;!--mce:protected %3C%21--mce%3Aprotected%20%253C%2521--%25u2013%25u2013%2520end%2520of%2520Bentley%2520header%2520%25u2013%25u2013--%253E--%3E--&gt;
&lt;h3&gt;&lt;span style="font-weight:400;"&gt;A Python script combining forces and displacements for a single wall into a plot and table&lt;/span&gt;&lt;/h3&gt;
&lt;h1&gt;Introduction&lt;/h1&gt;
&lt;p&gt;In order to retrieve and document results for retaining walls (vertical plates) in PLAXIS 2D Output, several plots and tables need to be inspected and copied separately. For instance:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;A plot for the horizontal displacements (u&lt;sub&gt;x&lt;/sub&gt;)&lt;/li&gt;
&lt;li&gt;A plot for the axial forces (N)&lt;/li&gt;
&lt;li&gt;A plot for the bending moments (M)&lt;/li&gt;
&lt;li&gt;A table for the displacements ( |u|, u&lt;sub&gt;x&lt;/sub&gt;, u&lt;sub&gt;y&lt;/sub&gt;)&lt;/li&gt;
&lt;li&gt;A table for the forces (N, Q, and M)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;When copying this data for many phases, this can be a lot of work, and is prone to human error, e.g. by taking the wrong phase or by forgetting to press Ctrl+C when inspecting a table.&lt;/p&gt;
&lt;h1&gt;Python solution&lt;/h1&gt;
&lt;p&gt;By using the Remote Scripting Server in the Plaxis Output program, we can create a Python script to automatically retrieve the desired displacements and forces for a certain vertical plate. The attached script will ask the user to define the X-coordinate for the vertical plate and to define for which phase the results should be obtained.&lt;/p&gt;
&lt;p&gt;The Python script will then:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Gather the plate results and filter them based on the X-coordinate&lt;/li&gt;
&lt;li&gt;Create a table of these results and copy this table to the Windows clipboard (tab-delimited). This can then easily be pasted into a spreadsheet program.&lt;/li&gt;
&lt;li&gt;Generate a chart, showing the wall with the results for horizontal displacement (u&lt;sub&gt;x&lt;/sub&gt;), axial force (N) and bending moment (M) in one chart.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Script output - table&lt;/h2&gt;
&lt;p&gt;The resulting table will be copied to the clipboard to be used in e.g. a spreadsheet program. It will contain a header with info on the phase the results are for and for which X-coordinate the results are taken, followed by the actual data table. The data is stored as tab-separated values.&lt;/p&gt;
&lt;p&gt;Based on the final phase of &lt;a href="/?p=488"&gt;Tutorial Lesson 2&lt;/a&gt;, this table will look like this:&lt;/p&gt;
&lt;div style="background:#f3f3f3;border:solid grey;border-width:.1em .1em .1em .8em;overflow:auto;padding:.2em .6em;width:auto;"&gt;
&lt;pre style="color:#000;font-family:&amp;#39;Lucida Console&amp;#39;,Consolas, Inconsolata,&amp;#39;DejaVu Sans Mono&amp;#39;, Monaco, &amp;#39;Courier New&amp;#39;, monospace;font-size:13px;line-height:120%;margin:2px;overflow:auto;padding:5px;white-space:pre;"&gt;PLAXIS 2D Result script: Plate results
For phase: Third excavation stage [Phase_5]
Step number: Step_24
Vertical plate at X = 50.0 m

X    Y      u_x                  u_y                   |u|                 N                      Q                    M                      rotation
[m]  [m]    [m]                  [m]                   [m]                 [kN/m]                 [kN/m]               [kNm/m]                [&amp;deg;]
50   20     0.0224266240723166   -0.00775284541048889  0.0237288870206748  -0.000503572077390047   0.0171521096654468   2.87346535454702e-13  0.480217532450464
50   19.75  0.0245219323623862   -0.00775279974664634  0.0257183022514521  -2.76566870972096      -1.16857362594199    -0.114778674602701     0.480218001424812
50   19.5   0.0266170992800733   -0.00775265919316243  0.0277231617722547  -5.69441776254759      -3.73654034658163    -0.699885794686862     0.480223070463705
50   19.25  0.028712053956832    -0.00775241824433458  0.029740242619305   -8.79201320755032      -7.67343619438683    -2.09749667300932      0.480241927766234
50   19     0.0308067771926515   -0.00775207114821604  0.031767154862919   -12.0637175217222      -12.965949311491     -4.64903832929917      0.480288664180428
&lt;em&gt;[...]&lt;/em&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;h2&gt;Script output - plot&lt;/h2&gt;
&lt;p&gt;The Python script will define a &lt;em&gt;&lt;strong&gt;matplotlib&lt;/strong&gt;&lt;/em&gt;-chart with one vertical axis for the plate and three horizontal axes: u_x, N and M. This chart is based on &lt;a href="http://matplotlib.org/examples/axes_grid/demo_parasite_axes2.html"&gt;the parasites example from Matplotlib&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Based on the final phase of &lt;a href="/?p=488"&gt;Tutorial Lesson 2&lt;/a&gt;, this chart will look like this:&lt;/p&gt;
&lt;p&gt;&lt;img class="aligncenter size-beast-medium wp-image-9065" alt="Python generated plot showing combined results for displacements and forces" src="/cfs-file/__key/communityserver-wikis-components-files/00-00-00-05-58/python_5F00_script_5F00_chart_5F00_2D_5F00_wall_5F00_uNM_2D00_600x600.png" /&gt;&lt;/p&gt;
&lt;p style="text-align:center;"&gt;&lt;em&gt;Figure 1. Python generated plot showing combined results for displacements and forces for Tutorial Lesson 2&amp;#39;s final phase.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Note: this Python script will directly use the data from the PLAXIS Output program. The only exception is for the horizontal displacement u&lt;sub&gt;x&lt;/sub&gt;: when the SI unit for length [m] is used, the deformation values for the curve data are converted to [mm] to improve the reading of the generated graph.&lt;/p&gt;
&lt;h2&gt;Modules used&lt;/h2&gt;
&lt;p&gt;The Python script requires the following modules:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The &lt;em&gt;&lt;strong&gt;plxscripting&lt;/strong&gt;&lt;/em&gt; module to interact with PLAXIS 2D Output&lt;/li&gt;
&lt;li&gt;The &lt;em&gt;&lt;strong&gt;matplotlib&lt;/strong&gt;&lt;/em&gt; module to create a chart&lt;/li&gt;
&lt;li&gt;The &lt;em&gt;&lt;strong&gt;pyperclip&lt;/strong&gt;&lt;/em&gt; module to copy the content to the Windows clipboard&lt;/li&gt;
&lt;li&gt;The &lt;em&gt;&lt;strong&gt;easygui&lt;/strong&gt;&lt;/em&gt; module to create a nice user interface for the user to set values in order to retrieve results: the X-coordinate of the vertical plate and the phase to retrieve the results for.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;All modules are part of the standard PLAXIS 2D 2017 installation that includes a full Python 3.4.x distribution.&lt;/p&gt;
&lt;h2&gt;Usage instructions for Python script&lt;/h2&gt;
&lt;p&gt;To use this file:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Download the file (use Save As...)&lt;/li&gt;
&lt;li&gt;Unpack the zip file and copy the *.py file to this folder:&lt;br /&gt;&amp;lt;PLAXIS 2D installation folder&amp;gt;\pytools\output&lt;br /&gt;By default the installation folder for PLAXIS 2D is:&lt;br /&gt;C:\Program Files\Bentley\Geotechnical\PLAXIS 2D CONNECT Edition V20\&lt;br /&gt;For older versions, this is:&lt;br /&gt;C:\Program Files\Plaxis\Plaxis 2D\&lt;/li&gt;
&lt;li&gt;Restart PLAXIS 2D Output and open a Plaxis file with an activated retaining wall (vertical plate)&lt;/li&gt;
&lt;li&gt;In the Expert menu, go to Python &amp;gt; Run script &amp;gt; Tools. Here you should see the name of the Python file. When selecting it, it will execute the script to retrieve the results for the plate:&lt;br /&gt;&amp;bull; &amp;nbsp;As a table in the Windows clipboard&lt;br /&gt;&amp;bull; &amp;nbsp;Followed by generation of the chart&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;When you do not have access rights to add the script in this folder, alternatively, you can choose to use Expert menu &amp;gt; Python &amp;gt; Run script &amp;gt; Open... to manually open and run the file.&lt;/p&gt;
&lt;h2&gt;Version&lt;/h2&gt;
&lt;p&gt;This script has been made for PLAXIS 2D 2017.00 using Python 3.4.x&lt;br /&gt;The script has been tested with PLAXIS 2D CONNECT Edition V20 and V21.&lt;/p&gt;
&lt;h2&gt;Disclaimer&lt;/h2&gt;
&lt;p&gt;&lt;em&gt;This Python script is made available as a service to PLAXIS users and can only be used in combination with a Bentley Geotechnical SELECT Entitlement [GSE] (former PLAXIS-VIP) license.&lt;/em&gt;&lt;br /&gt;&lt;em&gt;You use this Python script at your own responsibility and you are solely responsible for its results and the use thereof. Plaxis does not accept any responsibility nor liability for the use of this Python script nor do we provide support &lt;/em&gt;on&lt;em&gt; its use.&lt;/em&gt;&lt;/p&gt;
&lt;div&gt;
&lt;h4&gt;Downloads&lt;/h4&gt;
&lt;ul style="color:#56aa1c;list-style-type:square;padding-bottom:5px;"&gt;
&lt;li&gt;&lt;a href="/cfs-file/__key/communityserver-wikis-components-files/00-00-00-05-58/5582.combined_5F00_plate_5F00_result_5F00_one_5F00_chart_5F00_using_5F00_python.py"&gt;[Python script] Combined plate result in one chart&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: bending moment, bending, python, pytool, API, App, Automation, Scripting, PLAXIS, table, deflection, plot, matplotlib, tool, PLAXIS 2D, pyapp&lt;/div&gt;
</description></item><item><title>Combined plate results in one chart using Python</title><link>https://communities.bentley.com/products/geotech-analysis/w/wiki/45457/combined-plate-results-in-one-chart-using-python/revision/3</link><pubDate>Fri, 30 Jul 2021 07:40:43 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:5040fd36-6d8e-44d1-b6a1-eaba107391c9</guid><dc:creator>Stefanos Papavasileiou</dc:creator><comments>https://communities.bentley.com/products/geotech-analysis/w/wiki/45457/combined-plate-results-in-one-chart-using-python#comments</comments><description>Revision 3 posted to GeoStudio | PLAXIS Wiki by Stefanos Papavasileiou on 7/30/2021 7:40:43 AM&lt;br /&gt;
&lt;div class="content-scrollable-wrapper" style="overflow:auto;border-collapse:collapse;padding-bottom:30px;"&gt;
&lt;table border="0" style="width:500px;background-color:#fffff;border:rgb(86, 170, 28) 0px solid;border-width:1px 0px 0px 0px;"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td style="text-align:right;border-bottom:rgb(86, 170, 28) 1px solid;padding:4px 5px 4px 50px;"&gt;&lt;strong&gt;Application&lt;/strong&gt;&lt;/td&gt;
&lt;td style="text-align:left;padding:4px 5px 4px 50px;border-bottom:rgb(86, 170, 28) 1px solid;"&gt;PLAXIS 2D&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="text-align:right;border-bottom:rgb(86, 170, 28) 1px solid;padding:4px 5px 4px 50px;"&gt;&lt;strong&gt;Version&lt;/strong&gt;&lt;/td&gt;
&lt;td style="text-align:left;padding:4px 5px 4px 50px;border-bottom:rgb(86, 170, 28) 1px solid;"&gt;PLAXIS 2D 2017&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="text-align:right;border-bottom:rgb(86, 170, 28) 1px solid;padding:4px 5px 4px 50px;"&gt;&lt;strong&gt;Date created&lt;/strong&gt;&lt;/td&gt;
&lt;td style="text-align:left;padding:4px 5px 4px 50px;border-bottom:rgb(86, 170, 28) 1px solid;"&gt;30 May 2017&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="text-align:right;border-bottom:rgb(86, 170, 28) 1px solid;padding:4px 5px 4px 50px;"&gt;&lt;strong&gt;Date modified&lt;/strong&gt;&lt;/td&gt;
&lt;td style="text-align:left;padding:4px 5px 4px 50px;border-bottom:rgb(86, 170, 28) 1px solid;"&gt;30 May 2017&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;tbody&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;!--–– end of Bentley header ––--&gt;
&lt;h3&gt;&lt;span style="font-weight:400;"&gt;A Python script combining forces and displacements for a single wall into a plot and table&lt;/span&gt;&lt;/h3&gt;
&lt;h1&gt;Introduction&lt;/h1&gt;
&lt;p&gt;In order to retrieve and document results for retaining walls (vertical plates) in PLAXIS 2D Output, several plots and tables need to be inspected and copied separately. For instance:&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;A plot for the horizontal displacements (u&lt;sub&gt;x&lt;/sub&gt;)&lt;/li&gt;&lt;li&gt;A plot for the axial forces (N)&lt;/li&gt;&lt;li&gt;A plot for the bending moments (M)&lt;/li&gt;&lt;li&gt;A table for the displacements ( |u|, u&lt;sub&gt;x&lt;/sub&gt;, u&lt;sub&gt;y&lt;/sub&gt;)&lt;/li&gt;&lt;li&gt;A table for the forces (N, Q, and M)&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;When copying this data for many phases, this can be a lot of work, and is prone to human error, e.g. by taking the wrong phase or by forgetting to press Ctrl+C when inspecting a table.&lt;/p&gt;
&lt;h1&gt;Python solution&lt;/h1&gt;
&lt;p&gt;By using the Remote Scripting Server in the Plaxis Output program, we can create a Python script to automatically retrieve the desired displacements and forces for a certain vertical plate. The attached script will ask the user to define the X-coordinate for the vertical plate and to define for which phase the results should be obtained.&lt;/p&gt;
&lt;p&gt;The Python script will then:&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;Gather the plate results and filter them based on the X-coordinate&lt;/li&gt;&lt;li&gt;Create a table of these results and copy this table to the Windows clipboard (tab-delimited). This can then easily be pasted into a spreadsheet program.&lt;/li&gt;&lt;li&gt;Generate a chart, showing the wall with the results for horizontal displacement (u&lt;sub&gt;x&lt;/sub&gt;), axial force (N) and bending moment (M) in one chart.&lt;/li&gt;&lt;/ul&gt;
&lt;h2&gt;Script output - table&lt;/h2&gt;
&lt;p&gt;The resulting table will be copied to the clipboard to be used in e.g. a spreadsheet program. It will contain a header with info on the phase the results are for and for which X-coordinate the results are taken, followed by the actual data table. The data is stored as tab-separated values.&lt;/p&gt;
&lt;p&gt;Based on the final phase of &lt;a href="/?p=488"&gt;Tutorial Lesson 2&lt;/a&gt;, this table will look like this:&lt;/p&gt;
&lt;div style="background:#f3f3f3;overflow:auto;width:auto;border:solid grey;border-width:.1em .1em .1em .8em;padding:.2em .6em;"&gt;&lt;pre style="color:#000;font-size:13px;font-family:&amp;#39;Lucida Console&amp;#39;,Consolas, Inconsolata,&amp;#39;DejaVu Sans Mono&amp;#39;, Monaco, &amp;#39;Courier New&amp;#39;, monospace;padding:5px;margin:2px;line-height:120%;overflow:auto;white-space:pre;"&gt;PLAXIS 2D Result script: Plate results
For phase: Third excavation stage [Phase_5]
Step number: Step_24
Vertical plate at X = 50.0 m

X    Y      u_x                  u_y                   |u|                 N                      Q                    M                      rotation
[m]  [m]    [m]                  [m]                   [m]                 [kN/m]                 [kN/m]               [kNm/m]                [°]
50   20     0.0224266240723166   -0.00775284541048889  0.0237288870206748  -0.000503572077390047   0.0171521096654468   2.87346535454702e-13  0.480217532450464
50   19.75  0.0245219323623862   -0.00775279974664634  0.0257183022514521  -2.76566870972096      -1.16857362594199    -0.114778674602701     0.480218001424812
50   19.5   0.0266170992800733   -0.00775265919316243  0.0277231617722547  -5.69441776254759      -3.73654034658163    -0.699885794686862     0.480223070463705
50   19.25  0.028712053956832    -0.00775241824433458  0.029740242619305   -8.79201320755032      -7.67343619438683    -2.09749667300932      0.480241927766234
50   19     0.0308067771926515   -0.00775207114821604  0.031767154862919   -12.0637175217222      -12.965949311491     -4.64903832929917      0.480288664180428
&lt;em&gt;[...]&lt;/em&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;h2&gt;Script output - plot&lt;/h2&gt;
&lt;p&gt;The Python script will define a &lt;em&gt;&lt;strong&gt;matplotlib&lt;/strong&gt;&lt;/em&gt;-chart with one vertical axis for the plate and three horizontal axes: u_x, N and M. This chart is based on &lt;a href="http://matplotlib.org/examples/axes_grid/demo_parasite_axes2.html"&gt;the parasites example from Matplotlib&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Based on the final phase of &lt;a href="/?p=488"&gt;Tutorial Lesson 2&lt;/a&gt;, this chart will look like this:&lt;/p&gt;
&lt;p&gt;&lt;img alt="Python generated plot showing combined results for displacements and forces" class="aligncenter size-beast-medium wp-image-9065" src="/cfs-file/__key/communityserver-wikis-components-files/00-00-00-05-58/python_5F00_script_5F00_chart_5F00_2D_5F00_wall_5F00_uNM_2D00_600x600.png" /&gt;&lt;/p&gt;
&lt;p style="text-align:center;"&gt;&lt;em&gt;Figure 1. Python generated plot showing combined results for displacements and forces for Tutorial Lesson 2&amp;#39;s final phase.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Note: this Python script will directly use the data from the PLAXIS Output program. The only exception is for the horizontal displacement u&lt;sub&gt;x&lt;/sub&gt;: when the SI unit for length [m] is used, the deformation values for the curve data are converted to [mm] to improve the reading of the generated graph.&lt;/p&gt;
&lt;h2&gt;Modules used&lt;/h2&gt;
&lt;p&gt;The Python script requires the following modules:&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;The &lt;em&gt;&lt;strong&gt;plxscripting&lt;/strong&gt;&lt;/em&gt; module to interact with PLAXIS 2D Output&lt;/li&gt;&lt;li&gt;The &lt;em&gt;&lt;strong&gt;matplotlib&lt;/strong&gt;&lt;/em&gt; module to create a chart&lt;/li&gt;&lt;li&gt;The &lt;em&gt;&lt;strong&gt;pyperclip&lt;/strong&gt;&lt;/em&gt; module to copy the content to the Windows clipboard&lt;/li&gt;&lt;li&gt;The &lt;em&gt;&lt;strong&gt;easygui&lt;/strong&gt;&lt;/em&gt; module to create a nice user interface for the user to set values in order to retrieve results: the X-coordinate of the vertical plate and the phase to retrieve the results for.&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;All modules are part of the standard PLAXIS 2D 2017 installation that includes a full Python 3.4.x distribution.&lt;/p&gt;
&lt;h2&gt;Usage instructions for Python script&lt;/h2&gt;
&lt;p&gt;To use this file:&lt;/p&gt;
&lt;ol&gt;&lt;li&gt;Download the file (use Save As...)&lt;/li&gt;&lt;li&gt;Unpack the zip file and copy the *.py file to this folder:&lt;br /&gt;&amp;lt;PLAXIS 2D installation folder&amp;gt;\pytools\output&lt;br /&gt;By default the installation folder for PLAXIS 2D is:&lt;br /&gt;C:\Program Files\Bentley\Geotechnical\PLAXIS 2D CONNECT Edition V20\&lt;br /&gt;For older versions, this is:&lt;br /&gt;C:\Program Files\Plaxis\Plaxis 2D\&lt;/li&gt;&lt;li&gt;Restart PLAXIS 2D Output and open a Plaxis file with an activated retaining wall (vertical plate)&lt;/li&gt;&lt;li&gt;In the Expert menu, go to Python &amp;gt; Run script &amp;gt; Tools. Here you should see the name of the Python file. When selecting it, it will execute the script to retrieve the results for the plate:&lt;br /&gt;•  As a table in the Windows clipboard&lt;br /&gt;•  Followed by generation of the chart&lt;/li&gt;&lt;/ol&gt;
&lt;p&gt;When you do not have access rights to add the script in this folder, alternatively, you can choose to use Expert menu &amp;gt; Python &amp;gt; Run script &amp;gt; Open... to manually open and run the file.&lt;/p&gt;
&lt;h2&gt;Version&lt;/h2&gt;
&lt;p&gt;This script has been made for PLAXIS 2D 2017.00 using Python 3.4.x&lt;/p&gt;
&lt;h2&gt;Disclaimer&lt;/h2&gt;
&lt;p&gt;&lt;em&gt;This Python script is made available as a service to PLAXIS users and can only be used in combination with a Bentley Geotechnical SELECT Entitlement [GSE] (former PLAXIS-VIP) license.&lt;/em&gt;&lt;br /&gt;&lt;em&gt;You use this Python script at your own responsibility and you are solely responsible for its results and the use thereof. Plaxis does not accept any responsibility nor liability for the use of this Python script nor do we provide support &lt;/em&gt;on&lt;em&gt; its use.&lt;/em&gt;&lt;/p&gt;
&lt;div&gt;
&lt;h4&gt;Downloads&lt;/h4&gt;
&lt;ul style="list-style-type:square;color:rgb(86, 170, 28);padding-bottom:5px;"&gt;
&lt;li&gt;&lt;a href="/cfs-file/__key/communityserver-wikis-components-files/00-00-00-05-58/combined_5F00_plate_5F00_result_5F00_one_5F00_chart_5F00_using_5F00_python.py"&gt;[Python script] Combined plate result in one chart&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: bending moment, bending, python, pytool, API, App, Automation, Scripting, PLAXIS, table, deflection, plot, matplotlib, tool, PLAXIS 2D, pyapp&lt;/div&gt;
</description></item><item><title>Combined plate results in one chart using Python</title><link>https://communities.bentley.com/products/geotech-analysis/w/wiki/45457/combined-plate-results-in-one-chart-using-python/revision/2</link><pubDate>Tue, 24 Dec 2019 11:16:10 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:5040fd36-6d8e-44d1-b6a1-eaba107391c9</guid><dc:creator>Micha van der Sloot</dc:creator><comments>https://communities.bentley.com/products/geotech-analysis/w/wiki/45457/combined-plate-results-in-one-chart-using-python#comments</comments><description>Revision 2 posted to GeoStudio | PLAXIS Wiki by Micha van der Sloot on 12/24/2019 11:16:10 AM&lt;br /&gt;
&lt;div class="content-scrollable-wrapper" style="overflow:auto;border-collapse:collapse;padding-bottom:30px;"&gt;
&lt;table border="0" style="width:500px;background-color:#fffff;border:rgb(86, 170, 28) 0px solid;border-width:1px 0px 0px 0px;"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td style="text-align:right;border-bottom:rgb(86, 170, 28) 1px solid;padding:4px 5px 4px 50px;"&gt;&lt;strong&gt;Application&lt;/strong&gt;&lt;/td&gt;
&lt;td style="text-align:left;padding:4px 5px 4px 50px;border-bottom:rgb(86, 170, 28) 1px solid;"&gt;PLAXIS 2D&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="text-align:right;border-bottom:rgb(86, 170, 28) 1px solid;padding:4px 5px 4px 50px;"&gt;&lt;strong&gt;Version&lt;/strong&gt;&lt;/td&gt;
&lt;td style="text-align:left;padding:4px 5px 4px 50px;border-bottom:rgb(86, 170, 28) 1px solid;"&gt;PLAXIS 2D 2017&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="text-align:right;border-bottom:rgb(86, 170, 28) 1px solid;padding:4px 5px 4px 50px;"&gt;&lt;strong&gt;Date created&lt;/strong&gt;&lt;/td&gt;
&lt;td style="text-align:left;padding:4px 5px 4px 50px;border-bottom:rgb(86, 170, 28) 1px solid;"&gt;30 May 2017&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="text-align:right;border-bottom:rgb(86, 170, 28) 1px solid;padding:4px 5px 4px 50px;"&gt;&lt;strong&gt;Date modified&lt;/strong&gt;&lt;/td&gt;
&lt;td style="text-align:left;padding:4px 5px 4px 50px;border-bottom:rgb(86, 170, 28) 1px solid;"&gt;30 May 2017&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;tbody&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;!--–– end of Bentley header ––--&gt;
&lt;h3&gt;&lt;span style="font-weight:400;"&gt;A Python script combining forces and displacements for a single wall into a plot and table&lt;/span&gt;&lt;/h3&gt;
&lt;h1&gt;Introduction&lt;/h1&gt;
&lt;p&gt;In order to retrieve and document results for retaining walls (vertical plates) in PLAXIS 2D Output, several plots and tables need to be inspected and copied separately. For instance:&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;A plot for the horizontal displacements (u&lt;sub&gt;x&lt;/sub&gt;)&lt;/li&gt;&lt;li&gt;A plot for the axial forces (N)&lt;/li&gt;&lt;li&gt;A plot for the bending moments (M)&lt;/li&gt;&lt;li&gt;A table for the displacements ( |u|, u&lt;sub&gt;x&lt;/sub&gt;, u&lt;sub&gt;y&lt;/sub&gt;)&lt;/li&gt;&lt;li&gt;A table for the forces (N, Q, and M)&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;When copying this data for many phases, this can be a lot of work, and is prone to human error, e.g. by taking the wrong phase or by forgetting to press Ctrl+C when inspecting a table.&lt;/p&gt;
&lt;h1&gt;Python solution&lt;/h1&gt;
&lt;p&gt;By using the Remote Scripting Server in the Plaxis Output program, we can create a Python script to automatically retrieve the desired displacements and forces for a certain vertical plate. The attached script will ask the user to define the X-coordinate for the vertical plate and to define for which phase the results should be obtained.&lt;/p&gt;
&lt;p&gt;The Python script will then:&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;Gather the plate results and filter them based on the X-coordinate&lt;/li&gt;&lt;li&gt;Create a table of these results and copy this table to the Windows clipboard (tab-delimited). This can then easily be pasted into a spreadsheet program.&lt;/li&gt;&lt;li&gt;Generate a chart, showing the wall with the results for horizontal displacement (u&lt;sub&gt;x&lt;/sub&gt;), axial force (N) and bending moment (M) in one chart.&lt;/li&gt;&lt;/ul&gt;
&lt;h2&gt;Script output - table&lt;/h2&gt;
&lt;p&gt;The resulting table will be copied to the clipboard to be used in e.g. a spreadsheet program. It will contain a header with info on the phase the results are for and for which X-coordinate the results are taken, followed by the actual data table. The data is stored as tab-separated values.&lt;/p&gt;
&lt;p&gt;Based on the final phase of &lt;a href="/?p=488"&gt;Tutorial Lesson 2&lt;/a&gt;, this table will look like this:&lt;/p&gt;
&lt;div style="background:#f3f3f3;overflow:auto;width:auto;border:solid grey;border-width:.1em .1em .1em .8em;padding:.2em .6em;"&gt;&lt;pre style="color:#000;font-size:13px;font-family:&amp;#39;Lucida Console&amp;#39;,Consolas, Inconsolata,&amp;#39;DejaVu Sans Mono&amp;#39;, Monaco, &amp;#39;Courier New&amp;#39;, monospace;padding:5px;margin:2px;line-height:120%;overflow:auto;white-space:pre;"&gt;PLAXIS 2D Result script: Plate results
For phase: Third excavation stage [Phase_5]
Step number: Step_24
Vertical plate at X = 50.0 m

X    Y      u_x                  u_y                   |u|                 N                      Q                    M                      rotation
[m]  [m]    [m]                  [m]                   [m]                 [kN/m]                 [kN/m]               [kNm/m]                [°]
50   20     0.0224266240723166   -0.00775284541048889  0.0237288870206748  -0.000503572077390047   0.0171521096654468   2.87346535454702e-13  0.480217532450464
50   19.75  0.0245219323623862   -0.00775279974664634  0.0257183022514521  -2.76566870972096      -1.16857362594199    -0.114778674602701     0.480218001424812
50   19.5   0.0266170992800733   -0.00775265919316243  0.0277231617722547  -5.69441776254759      -3.73654034658163    -0.699885794686862     0.480223070463705
50   19.25  0.028712053956832    -0.00775241824433458  0.029740242619305   -8.79201320755032      -7.67343619438683    -2.09749667300932      0.480241927766234
50   19     0.0308067771926515   -0.00775207114821604  0.031767154862919   -12.0637175217222      -12.965949311491     -4.64903832929917      0.480288664180428
&lt;em&gt;[...]&lt;/em&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;h2&gt;Script output - plot&lt;/h2&gt;
&lt;p&gt;The Python script will define a &lt;em&gt;&lt;strong&gt;matplotlib&lt;/strong&gt;&lt;/em&gt;-chart with one vertical axis for the plate and three horizontal axes: u_x, N and M. This chart is based on &lt;a href="http://matplotlib.org/examples/axes_grid/demo_parasite_axes2.html"&gt;the parasites example from Matplotlib&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Based on the final phase of &lt;a href="/?p=488"&gt;Tutorial Lesson 2&lt;/a&gt;, this chart will look like this:&lt;/p&gt;
&lt;p&gt;&lt;img alt="Python generated plot showing combined results for displacements and forces" class="aligncenter size-beast-medium wp-image-9065" src="/cfs-file/__key/communityserver-wikis-components-files/00-00-00-01-05/python_5F00_script_5F00_chart_5F00_2D_5F00_wall_5F00_uNM_2D00_600x600.png" /&gt;&lt;/p&gt;
&lt;p style="text-align:center;"&gt;&lt;em&gt;Figure 1. Python generated plot showing combined results for displacements and forces for Tutorial Lesson 2&amp;#39;s final phase.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Note: this Python script will directly use the data from the PLAXIS Output program. The only exception is for the horizontal displacement u&lt;sub&gt;x&lt;/sub&gt;: when the SI unit for length [m] is used, the deformation values for the curve data are converted to [mm] to improve the reading of the generated graph.&lt;/p&gt;
&lt;h2&gt;Modules used&lt;/h2&gt;
&lt;p&gt;The Python script requires the following modules:&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;The &lt;em&gt;&lt;strong&gt;plxscripting&lt;/strong&gt;&lt;/em&gt; module to interact with PLAXIS 2D Output&lt;/li&gt;&lt;li&gt;The &lt;em&gt;&lt;strong&gt;matplotlib&lt;/strong&gt;&lt;/em&gt; module to create a chart&lt;/li&gt;&lt;li&gt;The &lt;em&gt;&lt;strong&gt;pyperclip&lt;/strong&gt;&lt;/em&gt; module to copy the content to the Windows clipboard&lt;/li&gt;&lt;li&gt;The &lt;em&gt;&lt;strong&gt;easygui&lt;/strong&gt;&lt;/em&gt; module to create a nice user interface for the user to set values in order to retrieve results: the X-coordinate of the vertical plate and the phase to retrieve the results for.&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;All modules are part of the standard PLAXIS 2D 2017 installation that includes a full Python 3.4.x distribution.&lt;/p&gt;
&lt;h2&gt;Usage instructions for Python script&lt;/h2&gt;
&lt;p&gt;To use this file:&lt;/p&gt;
&lt;ol&gt;&lt;li&gt;Download the file (use Save As...)&lt;/li&gt;&lt;li&gt;Unpack the zip file and copy the *.py file to this folder:&lt;br /&gt;&amp;lt;PLAXIS 2D installation folder&amp;gt;\pytools\output&lt;br /&gt;By default the installation folder for PLAXIS 2D is:&lt;br /&gt;C:\Program Files\Bentley\Geotechnical\PLAXIS 2D CONNECT Edition V20\&lt;br /&gt;For older versions, this is:&lt;br /&gt;C:\Program Files\Plaxis\Plaxis 2D\&lt;/li&gt;&lt;li&gt;Restart PLAXIS 2D Output and open a Plaxis file with an activated retaining wall (vertical plate)&lt;/li&gt;&lt;li&gt;In the Expert menu, go to Python &amp;gt; Run script &amp;gt; Tools. Here you should see the name of the Python file. When selecting it, it will execute the script to retrieve the results for the plate:&lt;br /&gt;•  As a table in the Windows clipboard&lt;br /&gt;•  Followed by generation of the chart&lt;/li&gt;&lt;/ol&gt;
&lt;p&gt;When you do not have access rights to add the script in this folder, alternatively, you can choose to use Expert menu &amp;gt; Python &amp;gt; Run script &amp;gt; Open... to manually open and run the file.&lt;/p&gt;
&lt;h2&gt;Version&lt;/h2&gt;
&lt;p&gt;This script has been made for PLAXIS 2D 2017.00 using Python 3.4.x&lt;/p&gt;
&lt;h2&gt;Disclaimer&lt;/h2&gt;
&lt;p&gt;&lt;em&gt;This Python script is made available as a service to PLAXIS users and can only be used in combination with a Bentley Geotechnical SELECT Entitlement [GSE] (former PLAXIS-VIP) license.&lt;/em&gt;&lt;br /&gt;&lt;em&gt;You use this Python script at your own responsibility and you are solely responsible for its results and the use thereof. Plaxis does not accept any responsibility nor liability for the use of this Python script nor do we provide support &lt;/em&gt;on&lt;em&gt; its use.&lt;/em&gt;&lt;/p&gt;
&lt;div&gt;
&lt;h4&gt;Downloads&lt;/h4&gt;
&lt;ul style="list-style-type:square;color:rgb(86, 170, 28);padding-bottom:5px;"&gt;
&lt;li&gt;&lt;a href="/cfs-file/__key/communityserver-wikis-components-files/00-00-00-01-05/combined_5F00_plate_5F00_result_5F00_one_5F00_chart_5F00_using_5F00_python.py"&gt;[Python script] Combined plate result in one chart&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: bending moment, bending, python, pytool, API, App, Automation, Scripting, PLAXIS, table, deflection, plot, matplotlib, tool, PLAXIS 2D, pyapp&lt;/div&gt;
</description></item><item><title>Combined plate results in one chart using Python</title><link>https://communities.bentley.com/products/geotech-analysis/w/wiki/45457/combined-plate-results-in-one-chart-using-python/revision/1</link><pubDate>Wed, 18 Dec 2019 14:35:01 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:5040fd36-6d8e-44d1-b6a1-eaba107391c9</guid><dc:creator>Micha van der Sloot</dc:creator><comments>https://communities.bentley.com/products/geotech-analysis/w/wiki/45457/combined-plate-results-in-one-chart-using-python#comments</comments><description>Revision 1 posted to GeoStudio | PLAXIS Wiki by Micha van der Sloot on 12/18/2019 2:35:01 PM&lt;br /&gt;
&lt;div class="content-scrollable-wrapper" style="overflow:auto;border-collapse:collapse;padding-bottom:30px;"&gt;
&lt;table border="0" style="width:500px;background-color:#fffff;border:rgb(86, 170, 28) 0px solid;border-width:1px 0px 0px 0px;"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td style="text-align:right;border-bottom:rgb(86, 170, 28) 1px solid;padding:4px 5px 4px 50px;"&gt;&lt;strong&gt;Application&lt;/strong&gt;&lt;/td&gt;
&lt;td style="text-align:left;padding:4px 5px 4px 50px;border-bottom:rgb(86, 170, 28) 1px solid;"&gt;PLAXIS 2D&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="text-align:right;border-bottom:rgb(86, 170, 28) 1px solid;padding:4px 5px 4px 50px;"&gt;&lt;strong&gt;Version&lt;/strong&gt;&lt;/td&gt;
&lt;td style="text-align:left;padding:4px 5px 4px 50px;border-bottom:rgb(86, 170, 28) 1px solid;"&gt;PLAXIS 2D 2017&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="text-align:right;border-bottom:rgb(86, 170, 28) 1px solid;padding:4px 5px 4px 50px;"&gt;&lt;strong&gt;Date created&lt;/strong&gt;&lt;/td&gt;
&lt;td style="text-align:left;padding:4px 5px 4px 50px;border-bottom:rgb(86, 170, 28) 1px solid;"&gt;30 May 2017&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="text-align:right;border-bottom:rgb(86, 170, 28) 1px solid;padding:4px 5px 4px 50px;"&gt;&lt;strong&gt;Date modified&lt;/strong&gt;&lt;/td&gt;
&lt;td style="text-align:left;padding:4px 5px 4px 50px;border-bottom:rgb(86, 170, 28) 1px solid;"&gt;30 May 2017&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;tbody&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;!--–– end of Bentley header ––--&gt;
&lt;h3&gt;&lt;span style="font-weight:400;"&gt;A Python script combining forces and displacements for a single wall into a plot and table&lt;/span&gt;&lt;/h3&gt;
&lt;h1&gt;Introduction&lt;/h1&gt;
&lt;p&gt;In order to retrieve and document results for retaining walls (vertical plates) in PLAXIS 2D Output, several plots and tables need to be inspected and copied separately. For instance:&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;A plot for the horizontal displacements (u&lt;sub&gt;x&lt;/sub&gt;)&lt;/li&gt;&lt;li&gt;A plot for the axial forces (N)&lt;/li&gt;&lt;li&gt;A plot for the bending moments (M)&lt;/li&gt;&lt;li&gt;A table for the displacements ( |u|, u&lt;sub&gt;x&lt;/sub&gt;, u&lt;sub&gt;y&lt;/sub&gt;)&lt;/li&gt;&lt;li&gt;A table for the forces (N, Q, and M)&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;When copying this data for many phases, this can be a lot of work, and is prone to human error, e.g. by taking the wrong phase or by forgetting to press Ctrl+C when inspecting a table.&lt;/p&gt;
&lt;h1&gt;Python solution&lt;/h1&gt;
&lt;p&gt;By using the Remote Scripting Server in the Plaxis Output program, we can create a Python script to automatically retrieve the desired displacements and forces for a certain vertical plate. The attached script will ask the user to define the X-coordinate for the vertical plate and to define for which phase the results should be obtained.&lt;/p&gt;
&lt;p&gt;The Python script will then:&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;Gather the plate results and filter them based on the X-coordinate&lt;/li&gt;&lt;li&gt;Create a table of these results and copy this table to the Windows clipboard (tab-delimited). This can then easily be pasted into a spreadsheet program.&lt;/li&gt;&lt;li&gt;Generate a chart, showing the wall with the results for horizontal displacement (u&lt;sub&gt;x&lt;/sub&gt;), axial force (N) and bending moment (M) in one chart.&lt;/li&gt;&lt;/ul&gt;
&lt;h2&gt;Script output - table&lt;/h2&gt;
&lt;p&gt;The resulting table will be copied to the clipboard to be used in e.g. a spreadsheet program. It will contain a header with info on the phase the results are for and for which X-coordinate the results are taken, followed by the actual data table. The data is stored as tab-separated values.&lt;/p&gt;
&lt;p&gt;Based on the final phase of &lt;a href="/?p=488"&gt;Tutorial Lesson 2&lt;/a&gt;, this table will look like this:&lt;/p&gt;
&lt;div style="background:#f3f3f3;overflow:auto;width:auto;border:solid grey;border-width:.1em .1em .1em .8em;padding:.2em .6em;"&gt;&lt;pre style="color:#000;font-size:13px;font-family:&amp;#39;Lucida Console&amp;#39;,Consolas, Inconsolata,&amp;#39;DejaVu Sans Mono&amp;#39;, Monaco, &amp;#39;Courier New&amp;#39;, monospace;padding:5px;margin:2px;line-height:120%;overflow:auto;white-space:pre;"&gt;PLAXIS 2D Result script: Plate results
For phase: Third excavation stage [Phase_5]
Step number: Step_24
Vertical plate at X = 50.0 m

X    Y      u_x                  u_y                   |u|                 N                      Q                    M                      rotation
[m]  [m]    [m]                  [m]                   [m]                 [kN/m]                 [kN/m]               [kNm/m]                [°]
50   20     0.0224266240723166   -0.00775284541048889  0.0237288870206748  -0.000503572077390047   0.0171521096654468   2.87346535454702e-13  0.480217532450464
50   19.75  0.0245219323623862   -0.00775279974664634  0.0257183022514521  -2.76566870972096      -1.16857362594199    -0.114778674602701     0.480218001424812
50   19.5   0.0266170992800733   -0.00775265919316243  0.0277231617722547  -5.69441776254759      -3.73654034658163    -0.699885794686862     0.480223070463705
50   19.25  0.028712053956832    -0.00775241824433458  0.029740242619305   -8.79201320755032      -7.67343619438683    -2.09749667300932      0.480241927766234
50   19     0.0308067771926515   -0.00775207114821604  0.031767154862919   -12.0637175217222      -12.965949311491     -4.64903832929917      0.480288664180428
&lt;em&gt;[...]&lt;/em&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;h2&gt;Script output - plot&lt;/h2&gt;
&lt;p&gt;The Python script will define a &lt;em&gt;&lt;strong&gt;matplotlib&lt;/strong&gt;&lt;/em&gt;-chart with one vertical axis for the plate and three horizontal axes: u_x, N and M. This chart is based on &lt;a href="http://matplotlib.org/examples/axes_grid/demo_parasite_axes2.html"&gt;the parasites example from Matplotlib&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Based on the final phase of &lt;a href="/?p=488"&gt;Tutorial Lesson 2&lt;/a&gt;, this chart will look like this:&lt;/p&gt;
&lt;p&gt;&lt;img alt="Python generated plot showing combined results for displacements and forces" class="aligncenter size-beast-medium wp-image-9065" src="/cfs-file/__key/communityserver-wikis-components-files/00-00-00-01-05/python_5F00_script_5F00_chart_5F00_2D_5F00_wall_5F00_uNM_2D00_600x600.png" /&gt;&lt;/p&gt;
&lt;p style="text-align:center;"&gt;&lt;em&gt;Figure 1. Python generated plot showing combined results for displacements and forces for Tutorial Lesson 2&amp;#39;s final phase.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Note: this Python script will directly use the data from the PLAXIS Output program. The only exception is for the horizontal displacement u&lt;sub&gt;x&lt;/sub&gt;: when the SI unit for length [m] is used, the deformation values for the curve data are converted to [mm] to improve the reading of the generated graph.&lt;/p&gt;
&lt;h2&gt;Modules used&lt;/h2&gt;
&lt;p&gt;The Python script requires the following modules:&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;The &lt;em&gt;&lt;strong&gt;plxscripting&lt;/strong&gt;&lt;/em&gt; module to interact with PLAXIS 2D Output&lt;/li&gt;&lt;li&gt;The &lt;em&gt;&lt;strong&gt;matplotlib&lt;/strong&gt;&lt;/em&gt; module to create a chart&lt;/li&gt;&lt;li&gt;The &lt;em&gt;&lt;strong&gt;pyperclip&lt;/strong&gt;&lt;/em&gt; module to copy the content to the Windows clipboard&lt;/li&gt;&lt;li&gt;The &lt;em&gt;&lt;strong&gt;easygui&lt;/strong&gt;&lt;/em&gt; module to create a nice user interface for the user to set values in order to retrieve results: the X-coordinate of the vertical plate and the phase to retrieve the results for.&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;All modules are part of the standard PLAXIS 2D 2017 installation that includes a full Python 3.4.x distribution.&lt;/p&gt;
&lt;h2&gt;Usage instructions for Python script&lt;/h2&gt;
&lt;p&gt;To use this file:&lt;/p&gt;
&lt;ol&gt;&lt;li&gt;Download the file (use Save As...)&lt;/li&gt;&lt;li&gt;Unpack the zip file and copy the *.py file to this folder:&lt;br /&gt;&amp;lt;PLAXIS 2D installation folder&amp;gt;\pytools\output&lt;br /&gt;By default the installation folder for PLAXIS 2D is:&lt;br /&gt;C:\Program Files\Bentley\Geotechnical\PLAXIS 2D CONNECT Edition V20\&lt;br /&gt;For older versions, this is:&lt;br /&gt;C:\Program Files\Plaxis\Plaxis 2D\&lt;/li&gt;&lt;li&gt;Restart PLAXIS 2D Output and open a Plaxis file with an activated retaining wall (vertical plate)&lt;/li&gt;&lt;li&gt;In the Expert menu, go to Python &amp;gt; Run script &amp;gt; Tools. Here you should see the name of the Python file. When selecting it, it will execute the script to retrieve the results for the plate:&lt;br /&gt;•  As a table in the Windows clipboard&lt;br /&gt;•  Followed by generation of the chart&lt;/li&gt;&lt;/ol&gt;
&lt;p&gt;When you do not have access rights to add the script in this folder, alternatively, you can choose to use Expert menu &amp;gt; Python &amp;gt; Run script &amp;gt; Open... to manually open and run the file.&lt;/p&gt;
&lt;h2&gt;Version&lt;/h2&gt;
&lt;p&gt;This script has been made for PLAXIS 2D 2017.00 using Python 3.4.x&lt;/p&gt;
&lt;h2&gt;Disclaimer&lt;/h2&gt;
&lt;p&gt;&lt;em&gt;This Python script is made available as a service to PLAXIS users and can only be used in combination with a PLAXIS VIP license.&lt;/em&gt;&lt;br /&gt;&lt;em&gt;You use this Python script at your own responsibility and you are solely responsible for its results and the use thereof. Plaxis does not accept any responsibility nor liability for the use of this Python script nor do we provide support &lt;/em&gt;on&lt;em&gt; its use.&lt;/em&gt;&lt;/p&gt;
&lt;div&gt;
&lt;h4&gt;Downloads&lt;/h4&gt;
&lt;ul style="list-style-type:square;color:rgb(86, 170, 28);padding-bottom:5px;"&gt;
&lt;li&gt;&lt;a href="/cfs-file/__key/communityserver-wikis-components-files/00-00-00-01-05/combined_5F00_plate_5F00_result_5F00_one_5F00_chart_5F00_using_5F00_python.py"&gt;[Python script] Combined plate result in one chart&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: bending moment, bending, python, pytool, API, App, Automation, Scripting, PLAXIS, table, deflection, plot, matplotlib, tool, PLAXIS 2D, pyapp&lt;/div&gt;
</description></item></channel></rss>