<?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 Arcade Console Function Output Destination in .NET Maps SDK Questions</title>
    <link>https://community.esri.com/t5/net-maps-sdk-questions/arcade-console-function-output-destination/m-p/1255739#M11668</link>
    <description>&lt;P&gt;The Arcade Console app would be helpful for debugging Arcade scripts if I can access the Arcade Console function output in a WPF application that is using styles. Does the output go to the application standard output stream? Or, is there an API to access Arcade's Console output stream? How is the Arcade Console function output accessed in a WPF application?&lt;/P&gt;</description>
    <pubDate>Tue, 07 Feb 2023 15:24:18 GMT</pubDate>
    <dc:creator>Paul_K</dc:creator>
    <dc:date>2023-02-07T15:24:18Z</dc:date>
    <item>
      <title>Arcade Console Function Output Destination</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/arcade-console-function-output-destination/m-p/1255739#M11668</link>
      <description>&lt;P&gt;The Arcade Console app would be helpful for debugging Arcade scripts if I can access the Arcade Console function output in a WPF application that is using styles. Does the output go to the application standard output stream? Or, is there an API to access Arcade's Console output stream? How is the Arcade Console function output accessed in a WPF application?&lt;/P&gt;</description>
      <pubDate>Tue, 07 Feb 2023 15:24:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/arcade-console-function-output-destination/m-p/1255739#M11668</guid>
      <dc:creator>Paul_K</dc:creator>
      <dc:date>2023-02-07T15:24:18Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade Console Function Output Destination</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/arcade-console-function-output-destination/m-p/1255845#M11670</link>
      <description>&lt;P&gt;You can use&amp;nbsp; &lt;A title="ArcadeConsoleMessage" href="https://developers.arcgis.com/net/api-reference/api/netwin/Esri.ArcGISRuntime/Esri.ArcGISRuntime.ArcGISRuntimeEnvironment.ArcadeConsoleMessage.html" target="_blank" rel="noopener"&gt;&lt;SPAN class=""&gt;ArcGISRuntimeEnvironment&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;/A&gt;&lt;SPAN class=""&gt;&lt;A title="ArcadeConsoleMessage" href="https://developers.arcgis.com/net/api-reference/api/netwin/Esri.ArcGISRuntime/Esri.ArcGISRuntime.ArcGISRuntimeEnvironment.ArcadeConsoleMessage.html" target="_blank" rel="noopener"&gt;ArcadeConsoleMessage&lt;/A&gt; event and write to file or standard console.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;For example, if adding a new feature triggers an attribute rule that contains Console function in the ScriptExpression, we would expect this event to be raised with the message from Console function and some information about the rule and table.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;ArcGISRuntimeEnvironment.ArcadeConsoleMessage += (sender, eventArgs) =&amp;gt;
{
    // eventArgs.Context.Profile (i.e. ArcadeProfile.AttributeRuleCalculation)
    // eventArgs.Context.Information (i.e. ruleName, tableName for attribute rules)
    // eventArgs.Message (i.e. Console(&amp;lt;message&amp;gt;))
};

var sgdb = await ServiceGeodatabase.CreateAsync(new Uri(featureServerUrl));
var table = sgdb.GetTable(1);
await table.LoadAsync();
 
var feature = table.CreateFeature();
await table.AddFeatureAsync(feature); // triggers attribute rule with Console(&amp;lt;message&amp;gt;)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Feb 2023 19:31:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/arcade-console-function-output-destination/m-p/1255845#M11670</guid>
      <dc:creator>JenniferNeryEsri</dc:creator>
      <dc:date>2023-02-07T19:31:47Z</dc:date>
    </item>
  </channel>
</rss>

