<?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: Multiple Functions in one script in Developers Questions</title>
    <link>https://community.esri.com/t5/developers-questions/multiple-functions-in-one-script/m-p/656142#M4472</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Nit sure what your trying to accomplish but you can use multiple functions in label expression. See the python version below. vbscript shouldn't be much different&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;def FindLabel ( [OWNERNAME] ):
&amp;nbsp; lab = labelOther([OWNERNAME])
&amp;nbsp; return lab
def labelOther(x):
&amp;nbsp; return x&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 12 Dec 2021 03:46:53 GMT</pubDate>
    <dc:creator>WesMiller</dc:creator>
    <dc:date>2021-12-12T03:46:53Z</dc:date>
    <item>
      <title>Multiple Functions in one script</title>
      <link>https://community.esri.com/t5/developers-questions/multiple-functions-in-one-script/m-p/656141#M4471</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm very new to both ArcGIS and vbscript, so any help is appreciated. I'm working on a label making script, and I really want to make helper functions to help process the logic involved. Can I write more functions inside the expression parser? If the parser won't accept multiple functions, is there a way to store these functions in another location and access them in my script?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 May 2015 12:47:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/multiple-functions-in-one-script/m-p/656141#M4471</guid>
      <dc:creator>NicolasPeckman</dc:creator>
      <dc:date>2015-05-28T12:47:13Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple Functions in one script</title>
      <link>https://community.esri.com/t5/developers-questions/multiple-functions-in-one-script/m-p/656142#M4472</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Nit sure what your trying to accomplish but you can use multiple functions in label expression. See the python version below. vbscript shouldn't be much different&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;def FindLabel ( [OWNERNAME] ):
&amp;nbsp; lab = labelOther([OWNERNAME])
&amp;nbsp; return lab
def labelOther(x):
&amp;nbsp; return x&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 03:46:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/multiple-functions-in-one-script/m-p/656142#M4472</guid>
      <dc:creator>WesMiller</dc:creator>
      <dc:date>2021-12-12T03:46:53Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple Functions in one script</title>
      <link>https://community.esri.com/t5/developers-questions/multiple-functions-in-one-script/m-p/656143#M4473</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Using VBScript for multiple function as Wes stated can be done similarly to python.&amp;nbsp; As to storing and reusing the vbscript functions I do not think vbscript has the availability of the "Include" statement like VBA.&amp;nbsp; So you would have to develop a snippets library and cut/paste or develop your functions as a class object and run something like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;sub GetLib(Scriptname)
&amp;nbsp;&amp;nbsp; dim oFile
&amp;nbsp;&amp;nbsp; set oFile = oFso.OpenTextFile(Scriptname) 'File Script Object
&amp;nbsp;&amp;nbsp; ExecuteGlobal oFile.ReadAll()
&amp;nbsp;&amp;nbsp; oFile.Close
End Sub

Function test1(xxx)
&amp;nbsp;&amp;nbsp; dadfasdf
end Function

Function test2(xxxxx)
&amp;nbsp;&amp;nbsp;&amp;nbsp; .s;alkjdf;sdlkfj ....
end function&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Not worth it!&amp;nbsp; May have to resort to python for your re-usablitly question&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am a VB guy..... and this is better suited for python and develop your reusable portions as a custom toolbox.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(I hate Python....much prefer VB but it seems we are in the minority now and development goes on.....)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 03:46:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/multiple-functions-in-one-script/m-p/656143#M4473</guid>
      <dc:creator>TedKowal</dc:creator>
      <dc:date>2021-12-12T03:46:56Z</dc:date>
    </item>
  </channel>
</rss>

