<?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>In the python API, I would like to find the x and y positions of soil section in g_i.soils in order to set water levels on each side of a retaining wall.</title><link>https://communities.bentley.com/products/geotech-analysis/f/forum/209517/in-the-python-api-i-would-like-to-find-the-x-and-y-positions-of-soil-section-in-g_i-soils-in-order-to-set-water-levels-on-each-side-of-a-retaining-wall</link><description>In the API I can set a water level to a section as part of g_i.soils, however due to the presence of reinforcement I can&amp;#39;t always know what the index is for soil on the left and soil on the right. Knowing the y position of each object in g_i.soils would</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: In the python API, I would like to find the x and y positions of soil section in g_i.soils in order to set water levels on each side of a retaining wall.</title><link>https://communities.bentley.com/thread/634294?ContentTypeID=1</link><pubDate>Tue, 16 Feb 2021 09:37:05 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:90d3039a-ac51-49e4-b085-090ded3d8e1e</guid><dc:creator>Iman Warsame</dc:creator><description>&lt;p&gt;That&amp;#39;s great. Thank you very much!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: In the python API, I would like to find the x and y positions of soil section in g_i.soils in order to set water levels on each side of a retaining wall.</title><link>https://communities.bentley.com/thread/633950?ContentTypeID=1</link><pubDate>Fri, 12 Feb 2021 11:38:53 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:7f0e21c0-fdca-4358-8f65-de66f688880e</guid><dc:creator>Stefanos Papavasileiou</dc:creator><description>&lt;p&gt;Dear Iman,&lt;/p&gt;
&lt;p&gt;Usually, I handle Polygons instead of the user feature Soil, but it works the same way. Indeed, after the Mesh mode, all geometric information of polygons are not present as they are not relevant anymore.&lt;/p&gt;
&lt;p&gt;However, you can use the &lt;em&gt;BoundingBox&lt;/em&gt; property of a polygon to get the coordinates that refer to that object.&lt;/p&gt;
&lt;p&gt;E.g.&amp;nbsp;&lt;em&gt;echo Polygon_2_1.BoundingBox&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;For Python, you will need to do some parsing of the string/text but it is possible.&lt;/p&gt;
&lt;p&gt;Another way of ensuring you assign properties to a specific object is to work in advance and create it specifically and possible even rename it. For instance, in Structures you can define a polygon on the left side and a separate on the right side, call them, e.g., Clay_Left and Clay_Excavation, Clay_Right (please choose&amp;nbsp;more descriptive names) and then in Flow Conditions / Staged Construction you can run:&lt;/p&gt;
&lt;p&gt;&lt;em&gt;for polygon in g_i.Clay_Left:&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&amp;nbsp; &amp;nbsp; polygon.Soil.WaterConditions.Conditions[g_i.Phase_9] = &amp;quot;Custom Level&amp;quot;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;polygon.Soil.WaterConditions.Level[g_i.Phase_9] =&amp;nbsp;g_i.UserWaterLevel_1&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Note that the for-loop is needed as we cannot know beforehand in how many polygons the original Clay_Left polygon got split due to intersection, which you would not worry.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;For this matching of an object in Structures and Staged construction, the &lt;em&gt;get_equivalent&lt;/em&gt; function can also be used. This is explained in our Scripting manual:&amp;nbsp;&lt;a href="https://communities.bentley.com/products/geotech-analysis/w/plaxis-soilvision-wiki/45447/scripting-reference-and-how-to-use-it"&gt;communities.bentley.com/.../scripting-reference-and-how-to-use-it&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>