<?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: create-feature-from-a-modified-inspector in ArcGIS Pro SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/create-feature-from-a-modified-inspector/m-p/820097#M2791</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I tried your snippet on a SQLServer data and it worked as expected.&amp;nbsp; You can try to look at the error by adding this:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;createOp&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;Create&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;insp&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;MapMember&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; insp&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;ToDictionary&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;a &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; a&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;FieldName&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; a &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; a&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;CurrentValue&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; createResult &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; createOp&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;Execute&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;createResult &lt;SPAN class="operator token"&gt;!=&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;true&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;||&lt;/SPAN&gt; createOp&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;IsSucceeded &lt;SPAN class="operator token"&gt;!=&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;true&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
  MessageBox&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Show &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;$&lt;SPAN class="string token"&gt;@"Create failed: {createOp.ErrorMessage}"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;‍‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 12 Dec 2021 09:43:25 GMT</pubDate>
    <dc:creator>Wolf</dc:creator>
    <dc:date>2021-12-12T09:43:25Z</dc:date>
    <item>
      <title>create-feature-from-a-modified-inspector</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/create-feature-from-a-modified-inspector/m-p/820095#M2789</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="https://github.com/Esri/arcgis-pro-sdk/wiki/ProSnippets-Editing#create-feature-from-a-modified-inspector" target="_blank"&gt;https://github.com/Esri/arcgis-pro-sdk/wiki/ProSnippets-Editing#create-feature-from-a-modified-inspector&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I copied this code and ran it against a versioned feature class in enterprise sde (Oracle 12.1). It fails with "Edit operation failed." as the edit operation error message.&amp;nbsp;&amp;nbsp;I'm trying to take the selected feature make a copy and update some attributes is this the best way? Should I try some other method?&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt; ArcGIS.Desktop.Framework.Threading.Tasks.QueuedTask.Run(() =&amp;gt;
 {
 var insp = new ArcGIS.Desktop.Editing.Attributes.Inspector();
 var layer = ArcGIS.Desktop.Mapping.MapView.Active.Map.FindLayers("WATERLINE").FirstOrDefault() as BasicFeatureLayer;
 insp.Load(layer, 364323);
 // modify attributes if necessary
 // insp["Field1"] = newValue;
 insp["STATUS"] = 9;
 //Create new feature from an existing inspector (copying the feature)
 var createOp = new ArcGIS.Desktop.Editing.EditOperation();
 createOp.Name = "Create from insp";
 createOp.Create(insp.MapMember, insp.ToDictionary(a =&amp;gt; a.FieldName, a =&amp;gt; a.CurrentValue));
 createOp.Execute();
 });&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 16:57:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/create-feature-from-a-modified-inspector/m-p/820095#M2789</guid>
      <dc:creator>JimmyBowden</dc:creator>
      <dc:date>2021-12-12T16:57:24Z</dc:date>
    </item>
    <item>
      <title>Re: create-feature-from-a-modified-inspector</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/create-feature-from-a-modified-inspector/m-p/820096#M2790</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Jimmy,&lt;/P&gt;&lt;P&gt;The other syntax to try is the create method with a mapmember and inspector:&lt;/P&gt;&lt;PRE class="line-numbers language-csharp"&gt;&lt;CODE&gt;EditOperation&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;Create&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;ArcGIS&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Desktop&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Mapping&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;MapMember&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; ArcGIS&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Desktop&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Editing&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Attributes&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Inspector&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; System&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Action&lt;SPAN class="operator token"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class="keyword token"&gt;long&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you create a feature in the layer through the UI with that status value? Just checking if there's a constraint.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Apr 2020 15:43:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/create-feature-from-a-modified-inspector/m-p/820096#M2790</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2020-04-21T15:43:33Z</dc:date>
    </item>
    <item>
      <title>Re: create-feature-from-a-modified-inspector</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/create-feature-from-a-modified-inspector/m-p/820097#M2791</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I tried your snippet on a SQLServer data and it worked as expected.&amp;nbsp; You can try to look at the error by adding this:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;createOp&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;Create&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;insp&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;MapMember&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; insp&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;ToDictionary&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;a &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; a&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;FieldName&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; a &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; a&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;CurrentValue&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; createResult &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; createOp&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;Execute&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;createResult &lt;SPAN class="operator token"&gt;!=&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;true&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;||&lt;/SPAN&gt; createOp&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;IsSucceeded &lt;SPAN class="operator token"&gt;!=&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;true&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
  MessageBox&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Show &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;$&lt;SPAN class="string token"&gt;@"Create failed: {createOp.ErrorMessage}"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;‍‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 09:43:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/create-feature-from-a-modified-inspector/m-p/820097#M2791</guid>
      <dc:creator>Wolf</dc:creator>
      <dc:date>2021-12-12T09:43:25Z</dc:date>
    </item>
    <item>
      <title>Re: create-feature-from-a-modified-inspector</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/create-feature-from-a-modified-inspector/m-p/820098#M2792</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the prompt responses. &amp;nbsp;I spend more time today trying to find out what’s happening.&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;I can create features in the UI with no issues&lt;/LI&gt;&lt;LI&gt;I copied some features to a file gdb and the code works. &amp;nbsp;&lt;/LI&gt;&lt;LI&gt;I have been able to use the EditOperation.Duplicate and EditOperation.Update successfully on the same the enterprise sde feature class&lt;/LI&gt;&lt;LI&gt;The error message reported is “Edit Operation failed”&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;It’s just when I use EditOperation.Create against enterprise sde classic versioning that it fails. &amp;nbsp;There are attribute rules I will disable them and try this tomorrow. &amp;nbsp; &amp;nbsp;Any other suggestions would be helpful?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Apr 2020 04:04:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/create-feature-from-a-modified-inspector/m-p/820098#M2792</guid>
      <dc:creator>JimmyBowden</dc:creator>
      <dc:date>2020-04-22T04:04:42Z</dc:date>
    </item>
    <item>
      <title>Re: create-feature-from-a-modified-inspector</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/create-feature-from-a-modified-inspector/m-p/1125619#M7486</link>
      <description>&lt;P&gt;I'm now seeing the same behavior using ArcGIS Pro 2.8.3 and connecting to Utility Network branched versioned services from ArcGIS enterprise 10.9.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 13 Dec 2021 22:20:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/create-feature-from-a-modified-inspector/m-p/1125619#M7486</guid>
      <dc:creator>JimmyBowden</dc:creator>
      <dc:date>2021-12-13T22:20:34Z</dc:date>
    </item>
  </channel>
</rss>

