<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic VB to python in Geoprocessing Questions</title>
    <link>https://community.esri.com/t5/geoprocessing-questions/vb-to-python/m-p/310331#M10729</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi could anyone please, help me to rewrite the code from VB to python?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Expresion:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;strCobj&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;Dim strCobj as string
If Mid ( [PointId],2,1 ) = 1 Then
strCobj = "O"&amp;amp; Mid ( [PointId],3,3 )

elseif Mid ( [PointId],2,1 ) = 9 Then
strCobj = ""

elseif Mid ( [PointId],2,1 ) = 0 Then
strCobj = "F"&amp;amp; Mid ( [PointId],3,3 )

end if&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So far Im failed.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I m using arcgis10 and the old one VB code doesnt work:(&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;ty for any help&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 28 Jun 2011 07:51:45 GMT</pubDate>
    <dc:creator>TomasTencer</dc:creator>
    <dc:date>2011-06-28T07:51:45Z</dc:date>
    <item>
      <title>VB to python</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/vb-to-python/m-p/310331#M10729</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi could anyone please, help me to rewrite the code from VB to python?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Expresion:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;strCobj&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;Dim strCobj as string
If Mid ( [PointId],2,1 ) = 1 Then
strCobj = "O"&amp;amp; Mid ( [PointId],3,3 )

elseif Mid ( [PointId],2,1 ) = 9 Then
strCobj = ""

elseif Mid ( [PointId],2,1 ) = 0 Then
strCobj = "F"&amp;amp; Mid ( [PointId],3,3 )

end if&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So far Im failed.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I m using arcgis10 and the old one VB code doesnt work:(&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;ty for any help&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Jun 2011 07:51:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/vb-to-python/m-p/310331#M10729</guid>
      <dc:creator>TomasTencer</dc:creator>
      <dc:date>2011-06-28T07:51:45Z</dc:date>
    </item>
    <item>
      <title>Re: VB to python</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/vb-to-python/m-p/310332#M10730</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;This should be equivalent:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;if PointId[1:2] == 1:
&amp;nbsp; strCobj = "O" + PointId[2:5]
elif PointId[1:2] == 9:
&amp;nbsp; strCobj = ""
elif PointId[1:2] == 0:
&amp;nbsp; strCobj = "F" + PointId[2:5]&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;Python thinks in terms of offsets from the first position, so the first character has an offset of 0. Check out the section on 'slicing' in the tutorial that comes with Python help.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 14:50:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/vb-to-python/m-p/310332#M10730</guid>
      <dc:creator>BruceNielsen</dc:creator>
      <dc:date>2021-12-11T14:50:55Z</dc:date>
    </item>
  </channel>
</rss>

