<?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>Extract results over a chosen interface Python</title><link>https://communities.bentley.com/products/geotech-analysis/f/forum/235985/extract-results-over-a-chosen-interface-python</link><description>Hello, 
 
 I&amp;#39;m trying to write a python script that will extract stress and displacement results from all nodes on a single chosen interface, but am having some trouble with getting results for the interface element, i&amp;#39;ve tried variations on the code</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Extract results over a chosen interface Python</title><link>https://communities.bentley.com/thread/761747?ContentTypeID=1</link><pubDate>Thu, 13 Apr 2023 11:50:13 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:9fc64d5a-50c3-4173-b9b8-e978587b8cab</guid><dc:creator>Zakaria ZIRI</dc:creator><description>&lt;p&gt;Okay I understand. I&amp;#39;ve been avoiding this but I see that I have no choice. Thank you Stefanos, have a good day.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Extract results over a chosen interface Python</title><link>https://communities.bentley.com/thread/761746?ContentTypeID=1</link><pubDate>Thu, 13 Apr 2023 11:47:43 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:e98ed2b9-a099-47aa-a1b1-89c116526b0e</guid><dc:creator>Stefanos Papavasileiou</dc:creator><description>&lt;p&gt;Hello again,&lt;/p&gt;
&lt;p&gt;I meant that you should loop over all &lt;em&gt;Interfaces&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;This means that you would have first &lt;em&gt;PositiveInterface_1_1&lt;/em&gt;,&amp;nbsp;&lt;span&gt;&lt;em&gt;PositiveInterface_1_2&lt;/em&gt; and so on and then&amp;nbsp;&lt;em&gt;NegativeInterface_1_1&lt;/em&gt;,&amp;nbsp;&lt;em&gt;NegativeInterface_1_2&lt;/em&gt; and so on. There you can do your filtering.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;That would be the first parameter of the &lt;em&gt;getresults&lt;/em&gt; command as noted in the examples of the Command Reference, too.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Extract results over a chosen interface Python</title><link>https://communities.bentley.com/thread/761742?ContentTypeID=1</link><pubDate>Thu, 13 Apr 2023 11:37:55 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:dbefe9f6-399e-4dc5-acf8-b7b38aa1bec9</guid><dc:creator>Zakaria ZIRI</dc:creator><description>&lt;p&gt;Thanks you Stefanos. I thought of filtering by name but I couldn&amp;#39;t get the name for each interface. It works when I call results for one Interface (PositiveInterface_1 for example) but when I call all the interfaces, I get &amp;quot;Interfaces&amp;quot;. Do you have a suggestion ?&amp;nbsp;&lt;br /&gt;&amp;nbsp;&lt;img style="max-height:240px;max-width:320px;" src="/resized-image/__size/640x480/__key/communityserver-discussions-components-files/343671/pastedimage1681385892114v2.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Extract results over a chosen interface Python</title><link>https://communities.bentley.com/thread/761740?ContentTypeID=1</link><pubDate>Thu, 13 Apr 2023 11:30:03 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:f0d39d1b-c7a6-4011-9935-adb7a33a79ae</guid><dc:creator>Stefanos Papavasileiou</dc:creator><description>&lt;p&gt;Dear Zakaria,&lt;/p&gt;
&lt;p&gt;There is no distinction between positive or negative interfaces in PLAXIS. They are all &lt;em&gt;Interfaces&lt;/em&gt; for the results and the calculation kernel. The distinction is when it comes to determining the side for visualisation purposes.&lt;/p&gt;
&lt;p&gt;I would advise you instead of trying to get the results per &lt;em&gt;Interface&lt;/em&gt; object so you can filter them based on the names which include the word &lt;em&gt;Positive&lt;/em&gt;, instead.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Extract results over a chosen interface Python</title><link>https://communities.bentley.com/thread/761529?ContentTypeID=1</link><pubDate>Wed, 12 Apr 2023 09:08:55 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:0f607da9-86de-4b1e-98e7-cf20caf59027</guid><dc:creator>Zakaria ZIRI</dc:creator><description>&lt;p&gt;Hello &lt;a href="/members/cdbba617_2d00_aa83_2d00_4c94_2d00_b37e_2d00_bf6969746ae6"&gt;Stefanos Papavasileiou&lt;/a&gt;&amp;nbsp;&lt;br /&gt;Is there a way to get all the positive interfaces ? g_o.Interfaces works, but i&amp;#39;m looking for something like g_o.PositiveInterfaces&lt;br /&gt;Thank you&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Extract results over a chosen interface Python</title><link>https://communities.bentley.com/thread/733684?ContentTypeID=1</link><pubDate>Mon, 26 Sep 2022 08:09:03 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:c88bbb49-9604-4726-8868-761d94341a7d</guid><dc:creator>Stefanos Papavasileiou</dc:creator><description>&lt;p&gt;Great! I am glad to hear that!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Extract results over a chosen interface Python</title><link>https://communities.bentley.com/thread/733566?ContentTypeID=1</link><pubDate>Sat, 24 Sep 2022 11:22:22 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:05791283-39f4-461b-b800-41a659dce80f</guid><dc:creator>maddie groves</dc:creator><description>&lt;p&gt;Thanks Stefanos! It was the way i was trying to set the phase, in my ebedded beam one i had an extra stage (the g_o.Phases stage), but had forgotten to use that in this one, so i was just trying to use my phase as &amp;quot;8&amp;quot;. All sorted now!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Extract results over a chosen interface Python</title><link>https://communities.bentley.com/thread/733401?ContentTypeID=1</link><pubDate>Fri, 23 Sep 2022 07:38:16 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:ee32836e-9d3e-47ef-b2a6-272a98d521a7</guid><dc:creator>Stefanos Papavasileiou</dc:creator><description>&lt;p&gt;Dear Maggie,&lt;/p&gt;
&lt;p&gt;Have you checked our documentation? You can find it under &lt;strong&gt;Help&amp;gt;Command reference&amp;gt;Output commands&amp;gt;getresults.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;You can find a couple of alternatives (examples) of the syntax of the command that includes any object, e.g., embedded beam or in your case, interface.&lt;/p&gt;
&lt;p&gt;The same for scripting as you are writing a Python script.&amp;nbsp;&lt;span&gt;You can find it under &lt;strong&gt;Help&amp;gt;Scripting reference&amp;gt;Output&amp;gt;getresults&lt;/strong&gt;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;The one thing I notice in your case is that even though the structure of the command is correct, apparently the variable &amp;quot;interface&amp;quot; is pointing to a number (=8). So the error message is actually correct, something in your specified parameters is not as expected.&lt;br /&gt;Therefore, I think that somewhere in your script that variable is defined and it should have been, for example, g_o.PositiveInterface_8_1 and not it is just 8.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;If you correct that part in your script then the command should work, which you can verify by running it first in the PLAXIS command line (use the PLAXIS syntax) or via the Interpreter (with Python):&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;getresults PositiveInterface_8_1 ResultTypes.Interface.InterfaceTotalNormalStress &amp;quot;node&amp;quot;&amp;nbsp;&amp;nbsp;&amp;nbsp; # for example&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;interface = g_o.PositiveInterface_8_1&amp;nbsp; # for example&lt;br /&gt;phase = g_o.Phases[-1]&amp;nbsp; # for example&lt;br /&gt;g_o.getresults(interface, phase, g_o.ResultTypes.Interface.InterfaceTotalNormalStress, &amp;#39;node&amp;#39;)&lt;/em&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>