<?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: Simple scripting help in Mapping Questions</title>
    <link>https://community.esri.com/t5/mapping-questions/simple-scripting-help/m-p/236013#M2526</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think it is just "mod", i mean, you can input "i=5 mod 2" which will make i=1. So, "&lt;SPAN style="color: #000000; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px;"&gt;[ObjectID] Mod 2", as Hales mentioned above, is what you can use directly.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 13 Oct 2014 06:00:51 GMT</pubDate>
    <dc:creator>yiqi</dc:creator>
    <dc:date>2014-10-13T06:00:51Z</dc:date>
    <item>
      <title>Simple scripting help</title>
      <link>https://community.esri.com/t5/mapping-questions/simple-scripting-help/m-p/236008#M2521</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;to assist with symbology, I'm trying to populate a column with alternate 1 &amp;amp; 0 so I can filter and symbolise alternate records. I need a simple method to auto complete a table of approx 5000 records. Can anyone help?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Oct 2014 01:23:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/mapping-questions/simple-scripting-help/m-p/236008#M2521</guid>
      <dc:creator>stuartcassin1</dc:creator>
      <dc:date>2014-10-13T01:23:56Z</dc:date>
    </item>
    <item>
      <title>Re: Simple scripting help</title>
      <link>https://community.esri.com/t5/mapping-questions/simple-scripting-help/m-p/236009#M2522</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;python processor, use the FID field or any other sequential field&lt;/P&gt;&lt;P&gt;&amp;gt;&amp;gt;&amp;gt; from math import fmod&lt;/P&gt;&lt;P&gt;&amp;gt;&amp;gt;&amp;gt; for i in range(20):&lt;/P&gt;&lt;P&gt;...&amp;nbsp; if fmod(i,2) == 0:&lt;/P&gt;&lt;P&gt;...&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print 0&lt;/P&gt;&lt;P&gt;...&amp;nbsp; else:&lt;/P&gt;&lt;P&gt;...&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print 1&lt;/P&gt;&lt;P&gt;...&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;0&lt;/P&gt;&lt;P&gt;1&lt;/P&gt;&lt;P&gt;0&lt;/P&gt;&lt;P&gt;1&lt;/P&gt;&lt;P&gt;0&lt;/P&gt;&lt;P&gt;1&lt;/P&gt;&lt;P&gt;.......etc&lt;/P&gt;&lt;P&gt;1&lt;/P&gt;&lt;P&gt;0&lt;/P&gt;&lt;P&gt;1&lt;/P&gt;&lt;P&gt;0&lt;/P&gt;&lt;P&gt;1&lt;/P&gt;&lt;P&gt;0&lt;/P&gt;&lt;P&gt;1&lt;/P&gt;&lt;P&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/P&gt;&lt;P&gt;python parser, enable the code block this is the function to use and in the expression box you could use &lt;STRONG&gt;ones_zeros(!FID!) (&lt;/STRONG&gt;ps... haven't tried the code block but the above python syntax is the key&lt;/P&gt;&lt;PRE __default_attr="python" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14131667546702696 jive_text_macro" jivemacro_uid="_14131667546702696" modifiedtitle="true"&gt;
&lt;P&gt;from math import fmod&lt;/P&gt;
&lt;P&gt;def ones_zeros(your_field):&lt;/P&gt;
&lt;P&gt;&amp;nbsp; if fmod(your_field,2) == 0:&amp;nbsp; print 0&lt;/P&gt;
&lt;P&gt;&amp;nbsp; else:&amp;nbsp; print 1&lt;/P&gt;
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Oct 2014 02:22:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/mapping-questions/simple-scripting-help/m-p/236009#M2522</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2014-10-13T02:22:41Z</dc:date>
    </item>
    <item>
      <title>Re: Simple scripting help</title>
      <link>https://community.esri.com/t5/mapping-questions/simple-scripting-help/m-p/236010#M2523</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the suggestion Dan,&lt;/P&gt;&lt;P&gt;Unfortunately that didn't work. I mistakenly forgot to mention I'm using ArcGIS Basic 9.3.1 on an enterprise licence and I'm pretty sure the PythonWin Application hasn't been installed. Is there a way I can do this via the field calculator or the command line window?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm afraid my scripting / coding skills are pretty much zero.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Oct 2014 02:36:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/mapping-questions/simple-scripting-help/m-p/236010#M2523</guid>
      <dc:creator>stuartcassin1</dc:creator>
      <dc:date>2014-10-13T02:36:00Z</dc:date>
    </item>
    <item>
      <title>Re: Simple scripting help</title>
      <link>https://community.esri.com/t5/mapping-questions/simple-scripting-help/m-p/236011#M2524</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You should be able to just use the Mod operator in the Field Calculator:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_14131722988674696" jivemacro_uid="_14131722988674696" modifiedtitle="true"&gt;
&lt;P&gt;[ObjectID] Mod 2&lt;/P&gt;

&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Oct 2014 03:53:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/mapping-questions/simple-scripting-help/m-p/236011#M2524</guid>
      <dc:creator>TimothyHales</dc:creator>
      <dc:date>2014-10-13T03:53:09Z</dc:date>
    </item>
    <item>
      <title>Re: Simple scripting help</title>
      <link>https://community.esri.com/t5/mapping-questions/simple-scripting-help/m-p/236012#M2525</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Timothy,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any chance you could supply the full script for the Field calculator (9.3.1)? I have no idea what the Mod operator is.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sorry - scripting dummy here.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Oct 2014 04:16:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/mapping-questions/simple-scripting-help/m-p/236012#M2525</guid>
      <dc:creator>stuartcassin1</dc:creator>
      <dc:date>2014-10-13T04:16:39Z</dc:date>
    </item>
    <item>
      <title>Re: Simple scripting help</title>
      <link>https://community.esri.com/t5/mapping-questions/simple-scripting-help/m-p/236013#M2526</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think it is just "mod", i mean, you can input "i=5 mod 2" which will make i=1. So, "&lt;SPAN style="color: #000000; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px;"&gt;[ObjectID] Mod 2", as Hales mentioned above, is what you can use directly.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Oct 2014 06:00:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/mapping-questions/simple-scripting-help/m-p/236013#M2526</guid>
      <dc:creator>yiqi</dc:creator>
      <dc:date>2014-10-13T06:00:51Z</dc:date>
    </item>
    <item>
      <title>Re: Simple scripting help</title>
      <link>https://community.esri.com/t5/mapping-questions/simple-scripting-help/m-p/236014#M2527</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just some additional info for this question:&lt;/P&gt;&lt;P&gt;I'm using ArcGIS 9.3.1 Basic&lt;/P&gt;&lt;P&gt;I only have access to the command line window or the field calculator. All other scripting options are unavailable&lt;/P&gt;&lt;P&gt;I have pretty much no skills in scripting so really am looking for the complete answer (cut &amp;amp; paste??)&lt;/P&gt;&lt;P&gt;The only sequential field in the attribute table is the FID column.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hopefully someone can help me with an appropriate code. Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Oct 2014 21:58:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/mapping-questions/simple-scripting-help/m-p/236014#M2527</guid>
      <dc:creator>stuartcassin1</dc:creator>
      <dc:date>2014-10-13T21:58:36Z</dc:date>
    </item>
    <item>
      <title>Re: Simple scripting help</title>
      <link>https://community.esri.com/t5/mapping-questions/simple-scripting-help/m-p/236015#M2528</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Stuart,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Timothy's code is the complete copy and paste code that you need to put in the field calculator.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The only difference is that your field would be:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="javascript" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14132391337083611 jive_text_macro" jivemacro_uid="_14132391337083611"&gt;
&lt;P&gt;[FID] Mod 2&lt;/P&gt;

&lt;/PRE&gt;&lt;P&gt; Just Copy and Paste the above line in the Field Calculator window in ArcMap.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Oct 2014 22:27:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/mapping-questions/simple-scripting-help/m-p/236015#M2528</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2014-10-13T22:27:04Z</dc:date>
    </item>
    <item>
      <title>Re: Simple scripting help</title>
      <link>https://community.esri.com/t5/mapping-questions/simple-scripting-help/m-p/236016#M2529</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks guys.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Worked perfectly.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Oct 2014 22:38:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/mapping-questions/simple-scripting-help/m-p/236016#M2529</guid>
      <dc:creator>stuartcassin1</dc:creator>
      <dc:date>2014-10-13T22:38:21Z</dc:date>
    </item>
  </channel>
</rss>

