<?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 Re: Translate python label expression to VB in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/translate-python-label-expression-to-vb/m-p/191089#M14666</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Yup Im currently using 10.1. I'm working with DDP enabled mxd's that has some layers having label expressions in them that I created using a python parser. what I did was I created another script to batch export a series of DDP maps and when I ran it and checked the output pdf's, those layers with python label expressions are missing labels.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 24 Sep 2013 00:11:31 GMT</pubDate>
    <dc:creator>ChrisPedrezuela</dc:creator>
    <dc:date>2013-09-24T00:11:31Z</dc:date>
    <item>
      <title>Translate python label expression to VB</title>
      <link>https://community.esri.com/t5/python-questions/translate-python-label-expression-to-vb/m-p/191084#M14661</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;First off, I'll admit I do not know much about VB.&amp;nbsp; A while back I found that there is a bug with exporting maps that have "advanced" python expressions to PDF programmatically (i.e. doing this through arcpy.mapping).&amp;nbsp; This is not a problem when using VB label expressions.&amp;nbsp; I have been trying (and failing) to convert the following Python label expression to VB.&amp;nbsp; This works inside ArcMap but the labels disappear when exported to PDF due to the bug.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;def FindLabel ( [DEEDHOLDER] , [PID], [ACRES], [SUM_CSR_Potential], [AVE_CSR] ): &amp;nbsp; name = " ".join(str( [DEEDHOLDER] ).split(" ")[:5])&amp;nbsp;&amp;nbsp; # grab only first few words on top line &amp;nbsp; name2 =&amp;nbsp; " ".join(str( [DEEDHOLDER] ).split(" ")[5:])&amp;nbsp; # grab the rest if there are more to wrap to next line &amp;nbsp; if len(name2) &amp;gt; 1: &amp;nbsp;&amp;nbsp;&amp;nbsp; name = "\n".join([name,name2])&amp;nbsp; # join name and name2 vars by a new line &amp;nbsp; pid =&amp;nbsp; [PID]&amp;nbsp; &amp;nbsp; ac =&amp;nbsp; [ACRES] + " Ac"&amp;nbsp; &amp;nbsp; sump = "CSR: "+ str(round(float([SUM_CSR_Potential]),1)) &amp;nbsp; ave = "Ave: "+ [AVE_CSR]&amp;nbsp; &amp;nbsp; return "\n".join([name,pid,ac,sump,ave]) &lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This isn't too complicated in Python, but I am unable to successfully convert it to VB.&amp;nbsp; I would post my attempts at a VB solution, but I would rather save myself the embarrassment.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If anyone can help, I would appreciate it!&amp;nbsp; Meanwhile, I will keep trying.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Jul 2013 15:58:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/translate-python-label-expression-to-vb/m-p/191084#M14661</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2013-07-26T15:58:55Z</dc:date>
    </item>
    <item>
      <title>Re: Translate python label expression to VB</title>
      <link>https://community.esri.com/t5/python-questions/translate-python-label-expression-to-vb/m-p/191085#M14662</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;First off, I'll admit I do not know much about VB.&amp;nbsp; A while back I found that there is a bug with exporting maps that have "advanced" python expressions to PDF programmatically (i.e. doing this through arcpy.mapping).&amp;nbsp; This is not a problem when using VB label expressions.&amp;nbsp; I have been trying (and failing) to convert the following Python label expression to VB.&amp;nbsp; This works inside ArcMap but the labels disappear when exported to PDF due to the bug.&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;def FindLabel ( [DEEDHOLDER] , [PID], [ACRES], [SUM_CSR_Potential], [AVE_CSR] ): &amp;nbsp; name = " ".join(str( [DEEDHOLDER] ).split(" ")[:5])&amp;nbsp;&amp;nbsp; # grab only first few words on top line &amp;nbsp; name2 =&amp;nbsp; " ".join(str( [DEEDHOLDER] ).split(" ")[5:])&amp;nbsp; # grab the rest if there are more to wrap to next line &amp;nbsp; if len(name2) &amp;gt; 1: &amp;nbsp;&amp;nbsp;&amp;nbsp; name = "\n".join([name,name2])&amp;nbsp; # join name and name2 vars by a new line &amp;nbsp; pid =&amp;nbsp; [PID]&amp;nbsp; &amp;nbsp; ac =&amp;nbsp; [ACRES] + " Ac"&amp;nbsp; &amp;nbsp; sump = "CSR: "+ str(round(float([SUM_CSR_Potential]),1)) &amp;nbsp; ave = "Ave: "+ [AVE_CSR]&amp;nbsp; &amp;nbsp; return "\n".join([name,pid,ac,sump,ave]) &lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;This isn't too complicated in Python, but I am unable to successfully convert it to VB.&amp;nbsp; I would post my attempts at a VB solution, but I would rather save myself the embarrassment.&amp;nbsp; &lt;BR /&gt;&lt;BR /&gt;If anyone can help, I would appreciate it!&amp;nbsp; Meanwhile, I will keep trying.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Here is my attempt:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;Function FindLabel ( [DEEDHOLDER] , [PID], [ACRES], [SUM_CSR_Potential], [AVE_CSR] )&amp;nbsp; &amp;nbsp; Dim MyArray, i, name, pid, ac, sump, ave &amp;nbsp; MyArray = Split([DEEDHOLDER], " ")&amp;nbsp; &amp;nbsp; For i = 0 to UBound(MyArray) &amp;nbsp;&amp;nbsp;&amp;nbsp; if i = 0 Then &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; name = MyArray(i) ' First word of name. &amp;nbsp;&amp;nbsp;&amp;nbsp; ElseIf i / 5 &amp;lt;&amp;gt; Round(i / 5, 0) Then &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; name = name &amp;amp; " " &amp;amp; MyArray(i) ' Add space and word if less than 5 words in line &amp;nbsp;&amp;nbsp;&amp;nbsp; Else &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; name = name &amp;amp; vbCrLf &amp;amp; MyArray(i) ' Begin a new line after every 5th word. &amp;nbsp;&amp;nbsp;&amp;nbsp; End If &amp;nbsp; Next &amp;nbsp; pid =&amp;nbsp; [PID]&amp;nbsp; &amp;nbsp; ac =&amp;nbsp; [ACRES] &amp;amp; " Ac"&amp;nbsp; &amp;nbsp; sump = "CSR: " &amp;amp; str(round(cDbl([SUM_CSR_Potential]),1)) &amp;nbsp; ave = "Ave: " &amp;amp; [AVE_CSR]&amp;nbsp; &amp;nbsp; FindLabel = name &amp;amp; vbCrLf &amp;amp; pid &amp;amp; vbCrLf &amp;amp; ac &amp;amp; vbCrLf &amp;amp; sump &amp;amp; vbCrLf &amp;amp; ave&amp;nbsp; End Function&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Jul 2013 16:54:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/translate-python-label-expression-to-vb/m-p/191085#M14662</guid>
      <dc:creator>RichardFairhurst</dc:creator>
      <dc:date>2013-07-26T16:54:51Z</dc:date>
    </item>
    <item>
      <title>Re: Translate python label expression to VB</title>
      <link>https://community.esri.com/t5/python-questions/translate-python-label-expression-to-vb/m-p/191086#M14663</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thank you Richard!!!&amp;nbsp; You are the man!&amp;nbsp; I had to make 2 minor tweaks, but your code was almost flawless.&amp;nbsp; I would have never figured it out.&amp;nbsp; Here is what I ended up using:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
Function FindLabel ( [DEEDHOLDER] , [PID], [ACRES], [SUM_CSR_Potential], [AVE_CSR] )

&amp;nbsp; Dim MyArray, i, name, pid, ac, sump, ave
&amp;nbsp; MyArray = Split([DEEDHOLDER], " ")

&amp;nbsp; For i = 0 to UBound(MyArray)
&amp;nbsp;&amp;nbsp;&amp;nbsp; if i = 0 Then
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; name = MyArray(i) ' First word of name.
&amp;nbsp;&amp;nbsp;&amp;nbsp; ElseIf i / 5 &amp;lt;&amp;gt; Round(i / 5, 0) Then
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; name = name &amp;amp; " " &amp;amp; MyArray(i) ' Add space and word if less than 5 words in line
&amp;nbsp;&amp;nbsp;&amp;nbsp; Else
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; name = name &amp;amp; vbCrLf &amp;amp; MyArray(i) ' Begin a new line after every 5th word.
&amp;nbsp;&amp;nbsp;&amp;nbsp; End If
&amp;nbsp; Next
&amp;nbsp; pid =&amp;nbsp; [PID] 
&amp;nbsp; ac =&amp;nbsp; [ACRES] &amp;amp; " Ac" 
&amp;nbsp; sump = "CSR: " &amp;amp; CStr(Round(CSng([SUM_CSR_Potential]),1))
&amp;nbsp; ave = "Ave: " &amp;amp;&amp;nbsp; CStr(Round(CSng([AVE_CSR]),1)) 
&amp;nbsp; FindLabel = name &amp;amp; vbCrLf &amp;amp; pid &amp;amp; vbCrLf &amp;amp; ac &amp;amp; vbCrLf &amp;amp; sump &amp;amp; vbCrLf &amp;amp; ave 
End Function
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 09:36:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/translate-python-label-expression-to-vb/m-p/191086#M14663</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2021-12-11T09:36:25Z</dc:date>
    </item>
    <item>
      <title>Re: Translate python label expression to VB</title>
      <link>https://community.esri.com/t5/python-questions/translate-python-label-expression-to-vb/m-p/191087#M14664</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi guys, ran into this problem yesterday. Is there any other way besides converting to VB expressions?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Cheers&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Sep 2013 21:06:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/translate-python-label-expression-to-vb/m-p/191087#M14664</guid>
      <dc:creator>ChrisPedrezuela</dc:creator>
      <dc:date>2013-09-23T21:06:01Z</dc:date>
    </item>
    <item>
      <title>Re: Translate python label expression to VB</title>
      <link>https://community.esri.com/t5/python-questions/translate-python-label-expression-to-vb/m-p/191088#M14665</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Hi guys, ran into this problem yesterday. Is there any other way besides converting to VB expressions?&lt;BR /&gt;&lt;BR /&gt;Cheers&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Edit:&amp;nbsp; Reread original post and see that there is a bug.&amp;nbsp; So I guess Python is not an option with the PDF workflow.&amp;nbsp; JScript is also supposed to be an option, but either way it means a rewrite from Python.&amp;nbsp; I just happen to be very used to VB Script, so translating most non-spatial code is not too much of a problem for me.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Sep 2013 23:06:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/translate-python-label-expression-to-vb/m-p/191088#M14665</guid>
      <dc:creator>RichardFairhurst</dc:creator>
      <dc:date>2013-09-23T23:06:21Z</dc:date>
    </item>
    <item>
      <title>Re: Translate python label expression to VB</title>
      <link>https://community.esri.com/t5/python-questions/translate-python-label-expression-to-vb/m-p/191089#M14666</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Yup Im currently using 10.1. I'm working with DDP enabled mxd's that has some layers having label expressions in them that I created using a python parser. what I did was I created another script to batch export a series of DDP maps and when I ran it and checked the output pdf's, those layers with python label expressions are missing labels.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Sep 2013 00:11:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/translate-python-label-expression-to-vb/m-p/191089#M14666</guid>
      <dc:creator>ChrisPedrezuela</dc:creator>
      <dc:date>2013-09-24T00:11:31Z</dc:date>
    </item>
    <item>
      <title>Re: Translate python label expression to VB</title>
      <link>https://community.esri.com/t5/python-questions/translate-python-label-expression-to-vb/m-p/191090#M14667</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Here is the nimbus for the support incident I logged with Esri regarding the issue:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;NIM091502: Labels written in advanced python are not displayed when exported to PDF outside of ArcMap.&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Just to echo what Richard already said, I think VB may be the best option if you are exporting PDF's programmatically.&amp;nbsp; I have had successful exports with some 'advanced python' expressions I have tried, but VB never fails.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Sep 2013 00:21:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/translate-python-label-expression-to-vb/m-p/191090#M14667</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2013-09-24T00:21:46Z</dc:date>
    </item>
    <item>
      <title>Re: Translate python label expression to VB</title>
      <link>https://community.esri.com/t5/python-questions/translate-python-label-expression-to-vb/m-p/191091#M14668</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks Caleb, that answers a question I had today.&amp;nbsp; I'd further like to note that I was really impressed with how short the Python parser code for a multiline label was, contributed by Matt Sayler here:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://forums.arcgis.com/threads/92810-Pythn-to-TextWrap#2" rel="nofollow noopener noreferrer" target="_blank"&gt;http://forums.arcgis.com/threads/92810-Pythn-to-TextWrap#2&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I adapted it for use in displaying a legal description (which are typically very long) with this snippet:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
from textwrap import fill
def FindLabel([LEGAL1]):
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; x = fill([LEGAL1],18)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return x
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What I thought was interesting is that you can adapt some VBScript code (if you absolutely had to) from the Technical Article library here, in the last sample "Stack a label in multiple lines":&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;HowTo:&amp;nbsp; Label expression by way of VBScript&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://support.esri.com/en/knowledgebase/techarticles/detail/20154" rel="nofollow noopener noreferrer" target="_blank"&gt;http://support.esri.com/en/knowledgebase/techarticles/detail/20154&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The behavior for what I was using it for is the rough equivalent adaptation below.&amp;nbsp; A few of my own comments were added where I had to make a correction to 'skip over' to search for the next break in the attempt to stack lines roughly the same length.&amp;nbsp; I hesitated to post this code, because I still did not think it is well-written, but I suppose an adequate means to learn VBScript (and is supported by 10.0 and 10.1).&amp;nbsp; Anyway some of this functionality can likely be taken over by maplex labeling as now this is offered as part of the core product - I did not compare this functionality.&amp;nbsp; Nice to have options though and in case the index link is needed see this:&amp;nbsp; &lt;/SPAN&gt;&lt;A href="http://support.esri.com/en/knowledgebase/techarticles/index" rel="nofollow noopener noreferrer" target="_blank"&gt;http://support.esri.com/en/knowledgebase/techarticles/index&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Enjoy,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Wayne&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
Function FindLabel ( [LEGAL1] )
' Stacks a label in multiple lines if
' exceeding a given length.
' Note: Not applicable to line layers.
' ------------------------------------
&amp;nbsp; dim s, sNew, i, l
&amp;nbsp; s = [LEGAL1] 
&amp;nbsp; l = Len(s)
&amp;nbsp; if l &amp;gt; 15 then&amp;nbsp; ' stack if exceeding this length
&amp;nbsp;&amp;nbsp;&amp;nbsp; sNew = Left(s,15)
&amp;nbsp;&amp;nbsp;&amp;nbsp; i = 16&amp;nbsp; ' scan for blank space starting from this position
&amp;nbsp;&amp;nbsp;&amp;nbsp; While i &amp;lt;= l&amp;nbsp;&amp;nbsp; 'or: Do While
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if Mid(s,i,1) = " " then
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'added:&amp;nbsp; &amp;amp; Mid(s,i,15)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sNew = sNew &amp;amp; VBNewLine &amp;amp; Mid(s,i,15)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'added the following to "skip" i to the next segment
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; i = i + 15
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sNew = sNew &amp;amp; Mid(s,i,1)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'moved the below line inside "end if"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; i = i + 1
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; end if
&amp;nbsp;&amp;nbsp;&amp;nbsp; Wend 'or, coupled with the above "Do While":&amp;nbsp; Loop
&amp;nbsp; else
&amp;nbsp;&amp;nbsp;&amp;nbsp; sNew = s
&amp;nbsp; end if
 
&amp;nbsp; FindLabel = sNew
End Function
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 09:36:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/translate-python-label-expression-to-vb/m-p/191091#M14668</guid>
      <dc:creator>T__WayneWhitley</dc:creator>
      <dc:date>2021-12-11T09:36:28Z</dc:date>
    </item>
    <item>
      <title>Re: Translate python label expression to VB</title>
      <link>https://community.esri.com/t5/python-questions/translate-python-label-expression-to-vb/m-p/191092#M14669</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks guys. Luckily my python labels were just a stop gap solution. Since my datasets have been updated I wont be needing such advanced label expressions. But it was good to know that this issue exist and the workarounds.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Cheers&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Here is the nimbus for the support incident I logged with Esri regarding the issue:&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;NIM091502: Labels written in advanced python are not displayed when exported to PDF outside of ArcMap.&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;Just to echo what Richard already said, I think VB may be the best option if you are exporting PDF's programmatically.&amp;nbsp; I have had successful exports with some 'advanced python' expressions I have tried, but VB never fails.&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Sep 2013 22:51:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/translate-python-label-expression-to-vb/m-p/191092#M14669</guid>
      <dc:creator>ChrisPedrezuela</dc:creator>
      <dc:date>2013-09-24T22:51:59Z</dc:date>
    </item>
  </channel>
</rss>

