<?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: Where do the Arcade Console messages go to? in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/where-do-the-arcade-console-messages-go-to/m-p/1244213#M63825</link>
    <description>&lt;P&gt;When iterating through a series of features, how do you know where to put the console message? I have written the following calculate expression:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;var AssignedDate = $feature.CreationDate;
var Road = FeatureSetByName($datastore, 'Road');
var line_fs = Intersects(Road, Buffer($feature, 150, "Meters"));

// Cycle through road segments &amp;amp; find closest one
var min_dist = 9999
var nearest_RoadClass = null
var geo = Geometry($feature)
for(var line in line_fs) {
  var line_geo = Geometry(line)
  var dist = Distance(geo, line_geo)
  if(dist &amp;lt; min_dist) {
    min_dist = dist
    nearest_RoadClass = line.CLASS
}
}

Console(nearest_RoadClass)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and expect to see&amp;nbsp;&lt;EM&gt;Class 6&lt;/EM&gt; in the console message (if you look in the attribute table, you can see that I have selected a subset of my data and both of the features are closest to a Class 6 Road) but it returns&amp;nbsp;&lt;EM&gt;Class 5&lt;/EM&gt;. Why?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SHartholt_0-1672323861984.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/59425iBB772F12A48F2239/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SHartholt_0-1672323861984.png" alt="SHartholt_0-1672323861984.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Moving the Console message into the curly brackets above doesn't provide the expected output either:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;var AssignedDate = $feature.CreationDate;
var Road = FeatureSetByName($datastore, 'Road');
var line_fs = Intersects(Road, Buffer($feature, 150, "Meters"));

// Cycle through road segments &amp;amp; find closest one
var min_dist = 9999
var nearest_RoadClass = null
var geo = Geometry($feature)
for(var line in line_fs) {
  var line_geo = Geometry(line)
  var dist = Distance(geo, line_geo)
  if(dist &amp;lt; min_dist) {
    min_dist = dist
    nearest_RoadClass = line.CLASS
}
Console(nearest_RoadClass)
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SHartholt_1-1672324064321.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/59426iA76BB54A9597070A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SHartholt_1-1672324064321.png" alt="SHartholt_1-1672324064321.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Moving it up one more level also returns the&amp;nbsp;&lt;EM&gt;Class 5 Class 5 Class 5&lt;/EM&gt; output:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;var AssignedDate = $feature.CreationDate;
var Road = FeatureSetByName($datastore, 'Road');
var line_fs = Intersects(Road, Buffer($feature, 150, "Meters"));

// Cycle through road segments &amp;amp; find closest one
var min_dist = 9999
var nearest_RoadClass = null
var geo = Geometry($feature)
for(var line in line_fs) {
  var line_geo = Geometry(line)
  var dist = Distance(geo, line_geo)
  if(dist &amp;lt; min_dist) {
    min_dist = dist
    nearest_RoadClass = line.CLASS
Console(nearest_RoadClass)
}
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 29 Dec 2022 14:38:54 GMT</pubDate>
    <dc:creator>Anonymous User</dc:creator>
    <dc:date>2022-12-29T14:38:54Z</dc:date>
    <item>
      <title>Where do the Arcade Console messages go to?</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/where-do-the-arcade-console-messages-go-to/m-p/1057224#M40851</link>
      <description>&lt;P&gt;In ArcGIS Pro, when I use Arcade in an Attribute Rule or in a Label Expression, where do I see the messages I create using the "Console()" function?&lt;/P&gt;</description>
      <pubDate>Fri, 14 May 2021 08:50:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/where-do-the-arcade-console-messages-go-to/m-p/1057224#M40851</guid>
      <dc:creator>RalfSchmidt</dc:creator>
      <dc:date>2021-05-14T08:50:43Z</dc:date>
    </item>
    <item>
      <title>Re: Where do the Arcade Console messages go to?</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/where-do-the-arcade-console-messages-go-to/m-p/1058578#M41001</link>
      <description>&lt;P&gt;In the meantime I tried the following:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;I used SysInternals's program "DbgView" to check if the messages go there.&lt;/LI&gt;&lt;LI&gt;I started Pro from the command line. But no message appear there.&lt;/LI&gt;&lt;LI&gt;I got so desperate that I actually looked at the "Python Window" and the "Geoprocessing History". Of course with no success.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Common, Esri staff! Please at least tell me that these messages go nowhere. (And if so, please tell me how do you debug Attribute Rules.)&lt;/P&gt;</description>
      <pubDate>Mon, 17 May 2021 15:44:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/where-do-the-arcade-console-messages-go-to/m-p/1058578#M41001</guid>
      <dc:creator>RalfSchmidt</dc:creator>
      <dc:date>2021-05-17T15:44:41Z</dc:date>
    </item>
    <item>
      <title>Re: Where do the Arcade Console messages go to?</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/where-do-the-arcade-console-messages-go-to/m-p/1060071#M41182</link>
      <description>&lt;P&gt;I asked this exact question (for labels not attribute rules but I am sure it's the same) in an instructor-led class yesterday. The short version of the answer is that the messages go nowhere. They go to standard output but unless Esri catches standard output and sends it someplace they just disappear.&lt;/P&gt;&lt;P&gt;I will be starting on developing attribute rules in a few days. It appears environment for test and debug for Arcade is pretty much non-existent.&lt;/P&gt;</description>
      <pubDate>Thu, 20 May 2021 17:55:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/where-do-the-arcade-console-messages-go-to/m-p/1060071#M41182</guid>
      <dc:creator>Brian_Wilson</dc:creator>
      <dc:date>2021-05-20T17:55:10Z</dc:date>
    </item>
    <item>
      <title>Re: Where do the Arcade Console messages go to?</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/where-do-the-arcade-console-messages-go-to/m-p/1060079#M41184</link>
      <description>&lt;P&gt;Thanks for sharing this information with me, though it is very sobering. I fear I will need to put any debug message into a string attribute of the feature being edited.&lt;/P&gt;</description>
      <pubDate>Thu, 20 May 2021 18:16:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/where-do-the-arcade-console-messages-go-to/m-p/1060079#M41184</guid>
      <dc:creator>RalfSchmidt</dc:creator>
      <dc:date>2021-05-20T18:16:13Z</dc:date>
    </item>
    <item>
      <title>Re: Where do the Arcade Console messages go to?</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/where-do-the-arcade-console-messages-go-to/m-p/1060095#M41188</link>
      <description>&lt;P&gt;That's a good idea.&lt;/P&gt;&lt;P&gt;First impression: There is no way to extend Arcade, to improve it, or to call functions, or to load libraries. You can import or export a code block but you can't do it dynamically so there is no easy way to use an external IDE.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 20 May 2021 18:42:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/where-do-the-arcade-console-messages-go-to/m-p/1060095#M41188</guid>
      <dc:creator>Brian_Wilson</dc:creator>
      <dc:date>2021-05-20T18:42:38Z</dc:date>
    </item>
    <item>
      <title>Re: Where do the Arcade Console messages go to?</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/where-do-the-arcade-console-messages-go-to/m-p/1068068#M42011</link>
      <description>&lt;P&gt;I have the same problem when debugging attribute rules.&amp;nbsp; Although not as useful as console(), the dictionary keyword “errorMessage “ does help me. &amp;nbsp;You can create a long custom message without having to worry how to display it, because It will show up in the error window.&amp;nbsp; Example: &amp;nbsp;return {"errorMessage": "this will show up in the error window."} "&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/help/data/geodatabases/overview/attribute-rule-dictionary-keywords.htm" target="_blank"&gt;https://pro.arcgis.com/en/pro-app/latest/help/data/geodatabases/overview/attribute-rule-dictionary-keywords.htm&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 14 Jun 2021 18:37:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/where-do-the-arcade-console-messages-go-to/m-p/1068068#M42011</guid>
      <dc:creator>EStauber</dc:creator>
      <dc:date>2021-06-14T18:37:35Z</dc:date>
    </item>
    <item>
      <title>Re: Where do the Arcade Console messages go to?</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/where-do-the-arcade-console-messages-go-to/m-p/1125076#M48931</link>
      <description>&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="calcfield.jpg" style="width: 542px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/29449i0402DAF60A2E7DA5/image-size/large?v=v2&amp;amp;px=999" role="button" title="calcfield.jpg" alt="calcfield.jpg" /&gt;&lt;/span&gt;&lt;/DIV&gt;&lt;P&gt;I'd recommend the approach above. I do this using attribute rules, using Calculate Field-Arcade. (Don't&amp;nbsp; forget it, press Verify icon first)&lt;/P&gt;</description>
      <pubDate>Fri, 10 Dec 2021 21:36:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/where-do-the-arcade-console-messages-go-to/m-p/1125076#M48931</guid>
      <dc:creator>HildermesJoséMedeirosFilho</dc:creator>
      <dc:date>2021-12-10T21:36:59Z</dc:date>
    </item>
    <item>
      <title>Re: Where do the Arcade Console messages go to?</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/where-do-the-arcade-console-messages-go-to/m-p/1184828#M56403</link>
      <description>&lt;P&gt;I have also found that the ArcGIS Server log files contain the fuller error message. ArcGIS Pro usually truncates it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DrewDowling_0-1655840016071.png" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/43965iC1EDED23AABCF68F/image-size/large?v=v2&amp;amp;px=999" role="button" title="DrewDowling_0-1655840016071.png" alt="DrewDowling_0-1655840016071.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;but the logs record it all&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DrewDowling_1-1655840114255.png" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/43966i4CADC120E4D12645/image-size/large?v=v2&amp;amp;px=999" role="button" title="DrewDowling_1-1655840114255.png" alt="DrewDowling_1-1655840114255.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Jun 2022 19:36:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/where-do-the-arcade-console-messages-go-to/m-p/1184828#M56403</guid>
      <dc:creator>DrewDowling</dc:creator>
      <dc:date>2022-06-21T19:36:12Z</dc:date>
    </item>
    <item>
      <title>Re: Where do the Arcade Console messages go to?</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/where-do-the-arcade-console-messages-go-to/m-p/1244213#M63825</link>
      <description>&lt;P&gt;When iterating through a series of features, how do you know where to put the console message? I have written the following calculate expression:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;var AssignedDate = $feature.CreationDate;
var Road = FeatureSetByName($datastore, 'Road');
var line_fs = Intersects(Road, Buffer($feature, 150, "Meters"));

// Cycle through road segments &amp;amp; find closest one
var min_dist = 9999
var nearest_RoadClass = null
var geo = Geometry($feature)
for(var line in line_fs) {
  var line_geo = Geometry(line)
  var dist = Distance(geo, line_geo)
  if(dist &amp;lt; min_dist) {
    min_dist = dist
    nearest_RoadClass = line.CLASS
}
}

Console(nearest_RoadClass)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and expect to see&amp;nbsp;&lt;EM&gt;Class 6&lt;/EM&gt; in the console message (if you look in the attribute table, you can see that I have selected a subset of my data and both of the features are closest to a Class 6 Road) but it returns&amp;nbsp;&lt;EM&gt;Class 5&lt;/EM&gt;. Why?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SHartholt_0-1672323861984.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/59425iBB772F12A48F2239/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SHartholt_0-1672323861984.png" alt="SHartholt_0-1672323861984.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Moving the Console message into the curly brackets above doesn't provide the expected output either:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;var AssignedDate = $feature.CreationDate;
var Road = FeatureSetByName($datastore, 'Road');
var line_fs = Intersects(Road, Buffer($feature, 150, "Meters"));

// Cycle through road segments &amp;amp; find closest one
var min_dist = 9999
var nearest_RoadClass = null
var geo = Geometry($feature)
for(var line in line_fs) {
  var line_geo = Geometry(line)
  var dist = Distance(geo, line_geo)
  if(dist &amp;lt; min_dist) {
    min_dist = dist
    nearest_RoadClass = line.CLASS
}
Console(nearest_RoadClass)
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SHartholt_1-1672324064321.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/59426iA76BB54A9597070A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SHartholt_1-1672324064321.png" alt="SHartholt_1-1672324064321.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Moving it up one more level also returns the&amp;nbsp;&lt;EM&gt;Class 5 Class 5 Class 5&lt;/EM&gt; output:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;var AssignedDate = $feature.CreationDate;
var Road = FeatureSetByName($datastore, 'Road');
var line_fs = Intersects(Road, Buffer($feature, 150, "Meters"));

// Cycle through road segments &amp;amp; find closest one
var min_dist = 9999
var nearest_RoadClass = null
var geo = Geometry($feature)
for(var line in line_fs) {
  var line_geo = Geometry(line)
  var dist = Distance(geo, line_geo)
  if(dist &amp;lt; min_dist) {
    min_dist = dist
    nearest_RoadClass = line.CLASS
Console(nearest_RoadClass)
}
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 29 Dec 2022 14:38:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/where-do-the-arcade-console-messages-go-to/m-p/1244213#M63825</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2022-12-29T14:38:54Z</dc:date>
    </item>
    <item>
      <title>Re: Where do the Arcade Console messages go to?</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/where-do-the-arcade-console-messages-go-to/m-p/1568534#M91281</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/97192"&gt;@RalfSchmidt&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I started working with console messages recently to troubleshoot Attribute Rules written in Arcade.&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can access the console messages within the ArcGIS Pro environment by selecting Help &amp;gt; Diagnostic Monitor, and then clicking on the Log tab within the Diagnostic Monitor window. You can then filter the results of the Log by choosing console from the drop-down menu to the right of the filter.&lt;/P&gt;&lt;P&gt;Hope this helps!&lt;/P&gt;</description>
      <pubDate>Fri, 13 Dec 2024 19:46:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/where-do-the-arcade-console-messages-go-to/m-p/1568534#M91281</guid>
      <dc:creator>KatClifton</dc:creator>
      <dc:date>2024-12-13T19:46:03Z</dc:date>
    </item>
  </channel>
</rss>

