<?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: Python - help with GetMessage in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/python-help-with-getmessage/m-p/213486#M16446</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Do you mean arcpy.AddMessage('some message... ')? &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 Apr 2015 11:20:48 GMT</pubDate>
    <dc:creator>Luke_Pinner</dc:creator>
    <dc:date>2015-04-15T11:20:48Z</dc:date>
    <item>
      <title>Python - help with GetMessage</title>
      <link>https://community.esri.com/t5/python-questions/python-help-with-getmessage/m-p/213485#M16445</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am after a way on using arcpy.GetMessage to achieve the following message in the geoprocessing dialog result window?;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The above 4 datasets have been reprojected to: WGS Web Mercator (auxiliary sphere) and saved in S:\GisData&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does anybody know this can be achieved?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Apr 2015 09:08:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-help-with-getmessage/m-p/213485#M16445</guid>
      <dc:creator>MarkWisniewski</dc:creator>
      <dc:date>2015-04-15T09:08:48Z</dc:date>
    </item>
    <item>
      <title>Re: Python - help with GetMessage</title>
      <link>https://community.esri.com/t5/python-questions/python-help-with-getmessage/m-p/213486#M16446</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Do you mean arcpy.AddMessage('some message... ')? &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Apr 2015 11:20:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-help-with-getmessage/m-p/213486#M16446</guid>
      <dc:creator>Luke_Pinner</dc:creator>
      <dc:date>2015-04-15T11:20:48Z</dc:date>
    </item>
    <item>
      <title>Re: Python - help with GetMessage</title>
      <link>https://community.esri.com/t5/python-questions/python-help-with-getmessage/m-p/213487#M16447</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="http://resources.arcgis.com/en/help/main/10.2/index.html#//03q30000000r000000"&gt;GetMessages&lt;/A&gt; documentation....for recording errors&lt;/P&gt;&lt;P&gt;&lt;A href="http://resources.arcgis.com/en/help/main/10.2/index.html#/GetMessage/03q30000006s000000/"&gt;GetMessage&lt;/A&gt; documentation ... for geoprocessing services if there are any messages&lt;/P&gt;&lt;P&gt;Within there are a bunch of other message types.&lt;/P&gt;&lt;P&gt;AddMessage is needed to add 'stuff' which can be retrieved by any of the 'Gets...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Apr 2015 11:28:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-help-with-getmessage/m-p/213487#M16447</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2015-04-15T11:28:28Z</dc:date>
    </item>
    <item>
      <title>Re: Python - help with GetMessage</title>
      <link>https://community.esri.com/t5/python-questions/python-help-with-getmessage/m-p/213488#M16448</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN class="com"&gt;Trying to do this, which I cant get arcpy.Message(fc) and arcpy.Message(msg) to display results in dialog window.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="com"&gt;#Loop through shapfiles in folder and reproject&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;
 &lt;/SPAN&gt;&lt;SPAN class="kwd"&gt;for&lt;/SPAN&gt;&lt;SPAN class="pln"&gt; fc &lt;/SPAN&gt;&lt;SPAN class="kwd"&gt;in&lt;/SPAN&gt;&lt;SPAN class="pln"&gt; fcList&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;:&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;
&amp;nbsp; fcspatialRef &lt;/SPAN&gt;&lt;SPAN class="pun"&gt;=&lt;/SPAN&gt;&lt;SPAN class="pln"&gt; arcpy&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;.&lt;/SPAN&gt;&lt;SPAN class="typ"&gt;Describe&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;(&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;fc&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;).&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;spatialReference&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;name
&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class="kwd"&gt;if&lt;/SPAN&gt;&lt;SPAN class="pln"&gt; fcspatialRef &lt;/SPAN&gt;&lt;SPAN class="pun"&gt;!=&lt;/SPAN&gt;&lt;SPAN class="pln"&gt; spatialRef&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;:&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;
&amp;nbsp; arcpy&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;.&lt;/SPAN&gt;&lt;SPAN class="typ"&gt;Project_management&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;(&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;fc&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;,&lt;/SPAN&gt;&lt;SPAN class="pln"&gt; outFolder &lt;/SPAN&gt;&lt;SPAN class="pun"&gt;+&lt;/SPAN&gt;&lt;SPAN class="pln"&gt; &lt;/SPAN&gt;&lt;SPAN class="str"&gt;"\\"&lt;/SPAN&gt;&lt;SPAN class="pln"&gt; &lt;/SPAN&gt;&lt;SPAN class="pun"&gt;+&lt;/SPAN&gt;&lt;SPAN class="pln"&gt; fc&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;,&lt;/SPAN&gt;&lt;SPAN class="pln"&gt; template&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;)&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;
&amp;nbsp; projCount &lt;/SPAN&gt;&lt;SPAN class="pun"&gt;=&lt;/SPAN&gt;&lt;SPAN class="pln"&gt; int&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;(&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;arcpy&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;.&lt;/SPAN&gt;&lt;SPAN class="typ"&gt;GetCount_management&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;(&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;fc&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;).&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;getOutput&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;(&lt;/SPAN&gt;&lt;SPAN class="lit"&gt;0&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;))&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;
&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class="kwd"&gt;else&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;:&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;
&amp;nbsp; arcpy&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;.&lt;/SPAN&gt;&lt;SPAN class="typ"&gt;CopyFeatures_management&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;(&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;fc&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;,&lt;/SPAN&gt;&lt;SPAN class="pln"&gt; outFolder &lt;/SPAN&gt;&lt;SPAN class="pun"&gt;+&lt;/SPAN&gt;&lt;SPAN class="pln"&gt; &lt;/SPAN&gt;&lt;SPAN class="str"&gt;"\\"&lt;/SPAN&gt;&lt;SPAN class="pln"&gt; &lt;/SPAN&gt;&lt;SPAN class="pun"&gt;+&lt;/SPAN&gt;&lt;SPAN class="pln"&gt; fc&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;)&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;

&lt;/SPAN&gt;&lt;SPAN class="com"&gt;# Print shapefile Project results&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;
&amp;nbsp; arcpy&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;.&lt;/SPAN&gt;&lt;SPAN class="typ"&gt;AddMessage&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;(&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;fc&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;)&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;
&lt;/SPAN&gt;&lt;SPAN class="com"&gt;# Get the count from GetCount's Result object&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;
 msg &lt;/SPAN&gt;&lt;SPAN class="pun"&gt;=&lt;/SPAN&gt;&lt;SPAN class="pln"&gt; &lt;/SPAN&gt;&lt;SPAN class="str"&gt;"{0} datasets have been reprojected to: {1} and saved in {2}"&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;format&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;(&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;projCount&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;,&lt;/SPAN&gt;&lt;SPAN class="pln"&gt; spatialRef&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;,&lt;/SPAN&gt;&lt;SPAN class="pln"&gt; &lt;/SPAN&gt;&lt;SPAN class="typ"&gt;OutFolder&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;)&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;
 arcpy&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;.&lt;/SPAN&gt;&lt;SPAN class="typ"&gt;AddMessage&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;(&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;msg&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;)&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 10:28:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-help-with-getmessage/m-p/213488#M16448</guid>
      <dc:creator>MarkWisniewski</dc:creator>
      <dc:date>2021-12-11T10:28:25Z</dc:date>
    </item>
    <item>
      <title>Re: Python - help with GetMessage</title>
      <link>https://community.esri.com/t5/python-questions/python-help-with-getmessage/m-p/213489#M16449</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;Ernst Kemmerer wrote:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="com"&gt; I cant get it to work.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;That's not very informative. What does "&lt;SPAN class="com"&gt;cant get it to work" mean exactly? Do you get an unexpected result, do you get an error message, does python crash, does your PC crash, does your PC spontaneously combust and let all the magic smoke out?&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="com"&gt;Just kidding, what was the error message/unexpected result?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="com"&gt;PS: you are setting&amp;nbsp; &lt;CODE&gt;&lt;SPAN class="pln"&gt;projCount &lt;SPAN class="com" style="font-family: arial,helvetica,sans-serif;"&gt;to the number of features in the last &lt;SPAN style="font-family: courier new,courier;"&gt;fc&lt;/SPAN&gt; that you reproject. If you want to print the number of &lt;SPAN style="font-family: courier new,courier;"&gt;fc&lt;/SPAN&gt;s that you reprojected, you need to do something like:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;projCount = 0
&lt;CODE&gt;&lt;SPAN class="kwd"&gt;for&lt;/SPAN&gt;&lt;SPAN class="pln"&gt; fc &lt;/SPAN&gt;&lt;SPAN class="kwd"&gt;in&lt;/SPAN&gt;&lt;SPAN class="pln"&gt; fcList&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;:&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;
&lt;/SPAN&gt;&lt;/CODE&gt;
&lt;SPAN class="pun"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; etc...&lt;/SPAN&gt;
&lt;SPAN class="pun"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;CODE&gt;&lt;SPAN class="kwd"&gt;if&lt;/SPAN&gt;&lt;SPAN class="pln"&gt; fcspatialRef &lt;/SPAN&gt;&lt;SPAN class="pun"&gt;!=&lt;/SPAN&gt;&lt;SPAN class="pln"&gt; spatialRef&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;:&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;
&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/SPAN&gt;
&lt;SPAN class="pun"&gt;&lt;SPAN class="pun"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;CODE&gt;&lt;SPAN class="pln"&gt;arcpy&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;.&lt;/SPAN&gt;&lt;SPAN class="typ"&gt;Project_management&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;(&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;fc&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;,&lt;/SPAN&gt;&lt;SPAN class="pln"&gt; outFolder &lt;/SPAN&gt;&lt;SPAN class="pun"&gt;+&lt;/SPAN&gt;&lt;SPAN class="pln"&gt; &lt;/SPAN&gt;&lt;SPAN class="str"&gt;"\\"&lt;/SPAN&gt;&lt;SPAN class="pln"&gt; &lt;/SPAN&gt;&lt;SPAN class="pun"&gt;+&lt;/SPAN&gt;&lt;SPAN class="pln"&gt; fc&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;,template)&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN class="pun"&gt;&lt;SPAN class="pun"&gt;&lt;SPAN class="pun"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; projCount += 1 #or projCount = projCount + 1&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 10:28:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-help-with-getmessage/m-p/213489#M16449</guid>
      <dc:creator>Luke_Pinner</dc:creator>
      <dc:date>2021-12-11T10:28:28Z</dc:date>
    </item>
    <item>
      <title>Re: Python - help with GetMessage</title>
      <link>https://community.esri.com/t5/python-questions/python-help-with-getmessage/m-p/213490#M16450</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ernst, besides including the actual &lt;EM&gt;error message&lt;/EM&gt; in your reply as Luke suggested, it would help if you put you code in a formatted code block for Python, like is shown in Luke's reply.&amp;nbsp; Python is very picky on the indentation, and a straight copy/past tends to mess is up, making it hard for others to know whether indentation is causing you an issue or if there is some other issue.&amp;nbsp; there is a good how-to &lt;A href="https://community.esri.com/migration-blogpost/1070"&gt;Posting Code blocks in the new GeoNet&lt;/A&gt;​&amp;nbsp;&amp;nbsp; It's a very quick read, and since you seem to be getting into Python quick a bit this past week, it's worth getting in the habit since it would help others help you.&amp;nbsp; Main things, you have to be responding from the thread, not from within your inbox, so you can see the "Use Advanced Editor".&amp;nbsp;&amp;nbsp; Good luck, and I hope you get you problem resolved. &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Apr 2015 22:37:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-help-with-getmessage/m-p/213490#M16450</guid>
      <dc:creator>RebeccaStrauch__GISP</dc:creator>
      <dc:date>2015-04-15T22:37:14Z</dc:date>
    </item>
  </channel>
</rss>

