<?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 Calling A Model In Attribute Rules in Attribute Rules Questions</title>
    <link>https://community.esri.com/t5/attribute-rules-questions/calling-a-model-in-attribute-rules/m-p/1326170#M1104</link>
    <description>&lt;P&gt;I am trying to create a polyline copy of a feature when it gets created in a polygon feature class.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;The best way I see to do this is a feature to polyline tool inside of model builder, or running a model on a nightly process. It would be cool if we could get the polyline to generate with all the attributes from the polygon upon feature insertion by calling a model in attribute rules.&lt;/P&gt;&lt;P&gt;All of this is happening inside of an Enterprise GDB on SQL.&lt;/P&gt;</description>
    <pubDate>Wed, 06 Sep 2023 23:14:35 GMT</pubDate>
    <dc:creator>AKRRMapGuy</dc:creator>
    <dc:date>2023-09-06T23:14:35Z</dc:date>
    <item>
      <title>Calling A Model In Attribute Rules</title>
      <link>https://community.esri.com/t5/attribute-rules-questions/calling-a-model-in-attribute-rules/m-p/1326170#M1104</link>
      <description>&lt;P&gt;I am trying to create a polyline copy of a feature when it gets created in a polygon feature class.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;The best way I see to do this is a feature to polyline tool inside of model builder, or running a model on a nightly process. It would be cool if we could get the polyline to generate with all the attributes from the polygon upon feature insertion by calling a model in attribute rules.&lt;/P&gt;&lt;P&gt;All of this is happening inside of an Enterprise GDB on SQL.&lt;/P&gt;</description>
      <pubDate>Wed, 06 Sep 2023 23:14:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/attribute-rules-questions/calling-a-model-in-attribute-rules/m-p/1326170#M1104</guid>
      <dc:creator>AKRRMapGuy</dc:creator>
      <dc:date>2023-09-06T23:14:35Z</dc:date>
    </item>
    <item>
      <title>Re: Calling A Model In Attribute Rules</title>
      <link>https://community.esri.com/t5/attribute-rules-questions/calling-a-model-in-attribute-rules/m-p/1326409#M1106</link>
      <description>&lt;P&gt;You can convert the rings of a polygon to a path of a line, just pop the last coordinate that closes the polygon.&amp;nbsp; Use that json to construct a new polyline and return in an attribute rule.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is a sample you can test in the playground:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;var p = Polygon({
  rings: [
    [
      [-97.06138,32.837],
      [-97.06133,32.836],
      [-97.06124,32.834],
      [-97.06127,32.832],
      [-97.06138,32.837]
    ]
  ],
  spatialReference: { wkid: 3857 }
});

// Sample is only a single part polygon, can loop for multipart
var p_path = Dictionary(p)['rings'][0]
// remove last coordinate
Erase(p_path, -1)

var l = Polyline({
  paths: p_path,
  spatialReference: { wkid: 3857 }
});
return l&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Sep 2023 15:01:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/attribute-rules-questions/calling-a-model-in-attribute-rules/m-p/1326409#M1106</guid>
      <dc:creator>MikeMillerGIS</dc:creator>
      <dc:date>2023-09-07T15:01:22Z</dc:date>
    </item>
  </channel>
</rss>

