<?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: Can't create features on newly created feature class layers in ArcGIS Pro SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/can-t-create-features-on-newly-created-feature/m-p/798291#M1890</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for your reply! The code works for me, too. But what doesn't work is manually creating a feature on the newly created layers afterwards. Did you test that as well? In any case, I'm currently on vacation and maybe the problem lies in my project file which I will upload as soon as I'll be back after the holiday season in January.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards&lt;/P&gt;&lt;P&gt;Christian&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 20 Dec 2017 15:21:31 GMT</pubDate>
    <dc:creator>RehmSoftware</dc:creator>
    <dc:date>2017-12-20T15:21:31Z</dc:date>
    <item>
      <title>Can't create features on newly created feature class layers</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/can-t-create-features-on-newly-created-feature/m-p/798289#M1888</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'm currently dealing with a strange error message:&amp;nbsp;I'm creating a new feature class (via&amp;nbsp;&lt;EM&gt;CreateFeatureclass_management&lt;/EM&gt;) and adding fields (via &lt;EM&gt;AddField_management/AddFields_management&lt;/EM&gt;) in C# with the &lt;EM&gt;Geoprocessing&lt;/EM&gt; class and&amp;nbsp;that works fine. But after creating the layers and adding the fields I'd also like to create features on these layers.. so I switch to the "Edit" ribbon and click on "Create". I click the vertices of my polyline (or whatever geometry) and when I hit F2 to finish the process, an error message appears in the "Create Features" pane: &lt;STRONG&gt;"Failed to create new feature(s). This data is currently locked by another user and cannot be saved"&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;But the weird thing is:&amp;nbsp;There's no error message when calling these management-functions via arcpy. I think it's related to adding the fields to the layer since commenting out these calls in my code also results in no error message.. but I need to add fields to new and existing feature layers so leaving this out is not an option for me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I attached a sample to reproduce the behaviour. The class "Layer" servers as a lightweight wrapper for feature layers and the management-functions are called in &lt;EM&gt;Layer.AddToMapAsync&lt;/EM&gt; and &lt;EM&gt;Layer.SetupFieldsAsync&lt;/EM&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ArcGIS Pro is version 2.0.1 and the SDK is 2.0.0.8933.&lt;/P&gt;&lt;P&gt;Thanks in advance for any help!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards&lt;/P&gt;&lt;P&gt;Christian&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Dec 2017 12:50:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/can-t-create-features-on-newly-created-feature/m-p/798289#M1888</guid>
      <dc:creator>RehmSoftware</dc:creator>
      <dc:date>2017-12-04T12:50:45Z</dc:date>
    </item>
    <item>
      <title>Re: Can't create features on newly created feature class layers</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/can-t-create-features-on-newly-created-feature/m-p/798290#M1889</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Unfortunately, I was not able to reproduce the error. Your provided sample code works as expected.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Dec 2017 23:39:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/can-t-create-features-on-newly-created-feature/m-p/798290#M1889</guid>
      <dc:creator>ThomasEmge</dc:creator>
      <dc:date>2017-12-08T23:39:17Z</dc:date>
    </item>
    <item>
      <title>Re: Can't create features on newly created feature class layers</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/can-t-create-features-on-newly-created-feature/m-p/798291#M1890</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for your reply! The code works for me, too. But what doesn't work is manually creating a feature on the newly created layers afterwards. Did you test that as well? In any case, I'm currently on vacation and maybe the problem lies in my project file which I will upload as soon as I'll be back after the holiday season in January.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards&lt;/P&gt;&lt;P&gt;Christian&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Dec 2017 15:21:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/can-t-create-features-on-newly-created-feature/m-p/798291#M1890</guid>
      <dc:creator>RehmSoftware</dc:creator>
      <dc:date>2017-12-20T15:21:31Z</dc:date>
    </item>
    <item>
      <title>Re: Can't create features on newly created feature class layers</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/can-t-create-features-on-newly-created-feature/m-p/798292#M1891</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I see.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So the code works with subsequent feature creation as is in the upcoming 2.1 Pro release.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For the 2.0 there seems to be an issue with creating the fields on the background thread.&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the SetupFieldsAsync&amp;nbsp;function please remove the QueuedTask portion such that the field creation section reads like the following:&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="keyword token"&gt;foreach&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; field &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;this&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Fields&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; arguments &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;new&lt;/SPAN&gt; &lt;SPAN class="token class-name"&gt;List&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class="keyword token"&gt;string&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="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; arguments&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;Add&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="keyword token"&gt;this&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Name&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; arguments&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;Add&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;field&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Name&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; arguments&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;Add&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;field&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;DataType&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; arguments&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;Add&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;""&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;&amp;nbsp; &lt;SPAN class="comment token"&gt;//Precision&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; arguments&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;Add&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;""&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;&amp;nbsp; &lt;SPAN class="comment token"&gt;//Scale&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; arguments&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;Add&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;""&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;&amp;nbsp; &lt;SPAN class="comment token"&gt;//Length&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; arguments&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;Add&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;""&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;&amp;nbsp; &lt;SPAN class="comment token"&gt;//Alias&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; arguments&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;Add&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"NULLABLE"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;

&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; result &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;await&lt;/SPAN&gt; ArcGIS&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Desktop&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Core&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Geoprocessing&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Geoprocessing&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;ExecuteToolAsync&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"AddField_management"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; arguments&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;ToArray&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="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;result&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;ErrorCode &lt;SPAN class="operator token"&gt;!=&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;throw&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;new&lt;/SPAN&gt; &lt;SPAN class="token class-name"&gt;Exception&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"Failed to add field: "&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; field&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="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;/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;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;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&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;and the feature creation does succeed.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 09:14:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/can-t-create-features-on-newly-created-feature/m-p/798292#M1891</guid>
      <dc:creator>ThomasEmge</dc:creator>
      <dc:date>2021-12-12T09:14:11Z</dc:date>
    </item>
  </channel>
</rss>

