<?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>Generate horizontal cross section plots using python</title><link>https://communities.bentley.com/products/geotech-analysis/f/forum/192349/generate-horizontal-cross-section-plots-using-python</link><description>I would like to generate output plots showing a horizontal cross section showing the pase displacements in z-direction at a defined level in Plaxis 3D using the scripting server. Is there a way to do this, what is the command? I also tried to generate</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Generate horizontal cross section plots using python</title><link>https://communities.bentley.com/thread/619227?ContentTypeID=1</link><pubDate>Tue, 10 Nov 2020 16:01:12 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:aa3fee56-39ce-4f91-b300-bfd9b263e22c</guid><dc:creator>Stefanos Papavasileiou</dc:creator><description>&lt;p&gt;Dear Brian,&lt;/p&gt;
&lt;p&gt;One thing to comment, as from your description it is not clear what the failure message is, is to check for which Plots object you try to configure.&lt;/p&gt;
&lt;p&gt;The object Plots[-1] always points to the lastly created plot in Output. To give you an example:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;When opening a project in Output by default you get the deformed mesh, which is now the Plots[-1]&lt;/li&gt;
&lt;li&gt;When creating a cross-section a new plot object is created and you see a different window loaded in Output, so:&lt;br /&gt;Deformed mesh is: Plots[-2] or Plots[0]&lt;br /&gt;Cross-section is: Plots[-1] or Plots[1]&lt;/li&gt;
&lt;li&gt;That logic continues, when opening a different project or you create a structureplot, too.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;If you cannot figure out why your script does not do what you need, we can further assist you in a service request. Note that as we do not do code reviews in support, we can check the PLAXIS commands and their Python equivalents that work as intended.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Generate horizontal cross section plots using python</title><link>https://communities.bentley.com/thread/616909?ContentTypeID=1</link><pubDate>Wed, 28 Oct 2020 10:45:40 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:29023a2a-bc0a-4868-a300-4e86534ada91</guid><dc:creator>Brian Boye</dc:creator><description>&lt;p&gt;I have the same issue. Runs the first cross section plot but fails on sub sequent ones&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Generate horizontal cross section plots using python</title><link>https://communities.bentley.com/thread/568554?ContentTypeID=1</link><pubDate>Wed, 12 Feb 2020 15:35:13 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:9a67f700-4fb0-448c-80fb-b64ba99099b2</guid><dc:creator>Stefanos Papavasileiou</dc:creator><description>&lt;p&gt;Dear Klaas,&lt;/p&gt;
&lt;p&gt;The details of a question are only handled in a Service Request.&lt;/p&gt;
&lt;p&gt;Please refer to Service Request&amp;nbsp;&lt;span&gt;7001028158 for more in-depth assistance. I can follow-up with this question.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Generate horizontal cross section plots using python</title><link>https://communities.bentley.com/thread/568552?ContentTypeID=1</link><pubDate>Wed, 12 Feb 2020 15:23:12 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:ce78c978-095c-4cc8-a385-c5786d0cf602</guid><dc:creator>Klaas Siderius</dc:creator><description>&lt;p&gt;Thank you, I&amp;#39;m getting a step closer. The goal is to export cross section plots for all phases in my model. In which I preferably also can set the results that are shown in the cross section (e.g. Puz, utot etc.). with the command you provided I only can create one cross section after this it runs into an error. Below the error and the code.&lt;/p&gt;
&lt;p&gt;Error:&lt;/p&gt;
&lt;p&gt;lxscripting.plx_scripting_exceptions.PlxScriptingError: Unsuccessful command:&lt;br /&gt;The command &amp;#39;crosssectionplot&amp;#39; is only for 3D model view plots.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;g_o.Plots[-1].PhaseBehaviour = &amp;#39;projectphase&amp;#39;&lt;br /&gt;for phase in g_o.Phases: &lt;br /&gt; &lt;br /&gt;&amp;nbsp; &amp;nbsp;phase_name = phase.Name.value #retrieve phase name&lt;br /&gt;&amp;nbsp; &amp;nbsp;phase_id = phase.Identification.value #retrieve phase identification &lt;br /&gt; &lt;br /&gt;&amp;nbsp; &amp;nbsp;g_o.Plots[-1].Phase = phase &lt;br /&gt;&amp;nbsp; &amp;nbsp;g_o.Plots[-1].hide(g_o.WaterLoads) #hide/show water loads&lt;br /&gt;&amp;nbsp; &amp;nbsp;g_o.Plots[-1].hide(g_o.Interfaces) #hide/show interfaces&lt;br /&gt;&amp;nbsp; &amp;nbsp;g_o.Plots[-1].show(g_o.Pointloads) #hide/show point loads&lt;br /&gt;&amp;nbsp; &amp;nbsp;g_o.Plots[-1].show(g_o.Lineloads) #hide/show line loads&lt;br /&gt;&amp;nbsp; &amp;nbsp;g_o.Plots[-1].ResultType = g_o.ResultTypes.Soil.PUz&lt;br /&gt;&amp;nbsp; &amp;nbsp;g_o.crosssectionplot(g_o.Plots[-1], (0, 40, 0), (80, 40, 0), (0 , 40, 1)) &lt;br /&gt;&amp;nbsp; &amp;nbsp;g_o.Plots[-1].LegendSettings.MinValue = -0.015 #minimum Value of legend&lt;br /&gt;&amp;nbsp; &amp;nbsp;g_o.Plots[-1].LegendSettings.MaxValue = 0 #maximum value of legend&lt;br /&gt;&amp;nbsp; &amp;nbsp;g_o.Plots[-1].MeshSettings.ElementContours = False #hide Element contours True/False&lt;br /&gt; &lt;br /&gt;&amp;nbsp; &amp;nbsp;g_o.Plots[-1].export(output_location + &amp;#39;Puz&amp;#39; + phase_id + &amp;#39;.png&amp;#39;.format(phase), 1920, 1080)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Generate horizontal cross section plots using python</title><link>https://communities.bentley.com/thread/568546?ContentTypeID=1</link><pubDate>Wed, 12 Feb 2020 15:04:49 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:7c8caf7b-b58f-40f0-8575-2830d8b38742</guid><dc:creator>Stefanos Papavasileiou</dc:creator><description>&lt;p&gt;The correct syntax is:&lt;br /&gt;g_o.crosssectionplot(g_o.Plots[-1], (0, 0, -10), (1, 0, -10), (0 , 1, -10))&amp;nbsp; # the parentheses for the coordinates are optional&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;This is because the Plot object and the coordinates are parameters as explained in the Command reference.&lt;/p&gt;
&lt;p&gt;Note that we also have a Scripting reference that can be launched via Input and it includes the Output commands, too.&lt;/p&gt;
&lt;p&gt;&lt;a href="/products/geotechnical1/w/wiki/45447/scripting-reference-and-how-to-use-it"&gt;https://communities.bentley.com/products/geotechnical1/w/wiki/45447/scripting-reference-and-how-to-use-it&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Generate horizontal cross section plots using python</title><link>https://communities.bentley.com/thread/568544?ContentTypeID=1</link><pubDate>Wed, 12 Feb 2020 14:58:37 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:8222e7b4-3b4a-499b-9154-794e89186083</guid><dc:creator>Klaas Siderius</dc:creator><description>&lt;p&gt;Ah good to know that it is being looked into. Yes I know the command for the&amp;nbsp;cross section, but how does the command look like in Python using the remote scripting server. I&amp;nbsp;think it should look like someing as below but I can not get it to work. Are you able to help?&lt;/p&gt;
&lt;p&gt;g_o.Plots[-1].crossectionplot&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Generate horizontal cross section plots using python</title><link>https://communities.bentley.com/thread/568542?ContentTypeID=1</link><pubDate>Wed, 12 Feb 2020 14:42:42 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:0d854958-016b-42b8-9a04-c941b5ed708f</guid><dc:creator>Stefanos Papavasileiou</dc:creator><description>&lt;p&gt;Dear Klaas,&lt;/p&gt;
&lt;p&gt;An example of the command to create a cross-section&amp;nbsp;&lt;span&gt;specified by points (0 0 -10), (1 0 -10) and (0 1 -10)&lt;/span&gt; is:&lt;br /&gt;&lt;em&gt;crosssectionplot Plot_1 0 0 -10 1 0 -10 0 1 -10&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;This command is explained in the Help&amp;gt;Command reference or you can see it generated if you create manually a cross-section in Output using the side toolbar icon.&lt;/p&gt;
&lt;p&gt;Note that you have also submitted a service request about this question and it is currently being handled by a support engineer. The number is 7001028158.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>