<?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 How do you trap for an invalid create feature template item? in ArcObjects SDK Questions</title>
    <link>https://community.esri.com/t5/arcobjects-sdk-questions/how-do-you-trap-for-an-invalid-create-feature/m-p/641285#M17256</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm trying to trap for an invalid create feature template item. I've attached a screen shot of a create feature template that has an invalid drawing symbol.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You get this by doing the following:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Create a unique value renderer on a feature layer and then create the feature templates using the renderer. Next, delete one value from the previously created unique value renderer. The create feature template will then remove the symbology for the deleted value. When you right click on the template without a symbol you get the attached screen shot showing the "Drawing Symbol Will not draw!" message.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So, how do I check if a template is valid for drawing? I already have events in place for capturing a template when it is clicked.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;G&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 28 Sep 2011 16:59:04 GMT</pubDate>
    <dc:creator>GregRieck</dc:creator>
    <dc:date>2011-09-28T16:59:04Z</dc:date>
    <item>
      <title>How do you trap for an invalid create feature template item?</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/how-do-you-trap-for-an-invalid-create-feature/m-p/641285#M17256</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm trying to trap for an invalid create feature template item. I've attached a screen shot of a create feature template that has an invalid drawing symbol.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You get this by doing the following:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Create a unique value renderer on a feature layer and then create the feature templates using the renderer. Next, delete one value from the previously created unique value renderer. The create feature template will then remove the symbology for the deleted value. When you right click on the template without a symbol you get the attached screen shot showing the "Drawing Symbol Will not draw!" message.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So, how do I check if a template is valid for drawing? I already have events in place for capturing a template when it is clicked.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;G&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Sep 2011 16:59:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/how-do-you-trap-for-an-invalid-create-feature/m-p/641285#M17256</guid>
      <dc:creator>GregRieck</dc:creator>
      <dc:date>2011-09-28T16:59:04Z</dc:date>
    </item>
    <item>
      <title>Re: How do you trap for an invalid create feature template item?</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/how-do-you-trap-for-an-invalid-create-feature/m-p/641286#M17257</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You can do this by creating a temporary feature for the template then get its symbol from the renderer. If the symbol is null then you have the the 'symbol will not draw' case.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //get the template symbol
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IFeatureClass featClass = featLayer.FeatureClass;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IFeatureBuffer featBuffer = featClass.CreateFeatureBuffer();
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IFeature feature = featBuffer as IFeature;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; editTemplate.SetDefaultValues(feature);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IGeoFeatureLayer geoFeatLayer = featLayer as IGeoFeatureLayer;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ISymbol symbol = geoFeatLayer.Renderer.get_SymbolByFeature(feature);&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 03:15:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/how-do-you-trap-for-an-invalid-create-feature/m-p/641286#M17257</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2021-12-12T03:15:09Z</dc:date>
    </item>
    <item>
      <title>Re: How do you trap for an invalid create feature template item?</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/how-do-you-trap-for-an-invalid-create-feature/m-p/641287#M17258</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thank You Sean, works great!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Sep 2011 18:33:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/how-do-you-trap-for-an-invalid-create-feature/m-p/641287#M17258</guid>
      <dc:creator>GregRieck</dc:creator>
      <dc:date>2011-09-28T18:33:30Z</dc:date>
    </item>
    <item>
      <title>Re: How do you trap for an invalid create feature template item?</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/how-do-you-trap-for-an-invalid-create-feature/m-p/641288#M17259</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;You can do this by creating a temporary feature for the template then get its symbol from the renderer. If the symbol is null then you have the the 'symbol will not draw' case.&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //get the template symbol
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IFeatureClass featClass = featLayer.FeatureClass;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IFeatureBuffer featBuffer = featClass.CreateFeatureBuffer();
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IFeature feature = featBuffer as IFeature;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; editTemplate.SetDefaultValues(feature);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IGeoFeatureLayer geoFeatLayer = featLayer as IGeoFeatureLayer;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ISymbol symbol = geoFeatLayer.Renderer.get_SymbolByFeature(feature);&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I tried to run this code on the Python but it didn't run. I also have the "Drawing Symbol will not draw" error message.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Would appreciate your response.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 03:15:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/how-do-you-trap-for-an-invalid-create-feature/m-p/641288#M17259</guid>
      <dc:creator>OlamideOlasupo-Omole</dc:creator>
      <dc:date>2021-12-12T03:15:12Z</dc:date>
    </item>
    <item>
      <title>Re: How do you trap for an invalid create feature template item?</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/how-do-you-trap-for-an-invalid-create-feature/m-p/641289#M17260</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello &lt;/SPAN&gt;&lt;SPAN style="color: #3E3E3E; font-family: Arial;"&gt;Olamide.Omole,&lt;BR /&gt;&lt;BR /&gt;The code is c# and works fine in .Net. I'm sorry I don't use Python. You'll need to convert the code for use in Python. Perhaps copy the code and present it in a Python forum.&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;A class="jive-link-external-small" href="http://forums.arcgis.com/forums/117-Python" rel="nofollow" target="_blank"&gt;http://forums.arcgis.com/forums/117-Python&lt;/A&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Greg&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Mar 2014 14:35:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/how-do-you-trap-for-an-invalid-create-feature/m-p/641289#M17260</guid>
      <dc:creator>GregRieck</dc:creator>
      <dc:date>2014-03-11T14:35:21Z</dc:date>
    </item>
  </channel>
</rss>

