I want to programatically remove some tools from my configuration that I don't want a user to be able to use and also to set a default tool other than polygon. So below for my Active template, I ant to remove all tools but polygon and RAD Tool, then make the RAD Tool the default. I feel like I need to update the ToolOptions of the CIMEditingTemplate, but it is always null? Am I even on the correct place to accomplish this?

<SPAN class="keyword token">private</SPAN> <SPAN class="keyword token">static</SPAN> <SPAN class="keyword token">async</SPAN> <SPAN class="keyword token">void</SPAN> <SPAN class="token function">UpdateEditTemplates</SPAN><SPAN class="punctuation token">(</SPAN>FeatureLayer inFeatLayer<SPAN class="punctuation token">)</SPAN>
<SPAN class="punctuation token">{</SPAN>
<SPAN class="keyword token">try</SPAN>
<SPAN class="punctuation token">{</SPAN>
<SPAN class="keyword token">await</SPAN> QueuedTask<SPAN class="punctuation token">.</SPAN><SPAN class="token function">Run</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN> <SPAN class="operator token">=</SPAN><SPAN class="operator token">></SPAN>
<SPAN class="punctuation token">{</SPAN>
<SPAN class="comment token">//Get CIM layer definition</SPAN>
<SPAN class="keyword token">if</SPAN> <SPAN class="punctuation token">(</SPAN>inFeatLayer<SPAN class="punctuation token">.</SPAN><SPAN class="token function">GetDefinition</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN> <SPAN class="keyword token">is</SPAN> CIMFeatureLayer layerDef <SPAN class="operator token">&&</SPAN> <SPAN class="operator token">!</SPAN>layerDef<SPAN class="punctuation token">.</SPAN>FeatureTemplates<SPAN class="punctuation token">.</SPAN><SPAN class="token function">IsNullOrEmpty</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">)</SPAN>
<SPAN class="punctuation token">{</SPAN>
<SPAN class="comment token">//Get all templates on this layer</SPAN>
List<SPAN class="operator token"><</SPAN>CIMEditingTemplate<SPAN class="operator token">></SPAN> layerTemplates <SPAN class="operator token">=</SPAN> layerDef<SPAN class="punctuation token">.</SPAN>FeatureTemplates<SPAN class="punctuation token">.</SPAN><SPAN class="token function">ToList</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="comment token">//Remove templates matching a pattern</SPAN>
<SPAN class="keyword token">foreach</SPAN> <SPAN class="punctuation token">(</SPAN>CIMEditingTemplate CIMTemp <SPAN class="keyword token">in</SPAN> layerTemplates<SPAN class="punctuation token">)</SPAN>
<SPAN class="punctuation token">{</SPAN>
<SPAN class="comment token">//TOOL OPTIONS IS NULL?</SPAN>
<SPAN class="punctuation token">}</SPAN>
<SPAN class="comment token">//Set the templates and layer definition back on the layer</SPAN>
layerDef<SPAN class="punctuation token">.</SPAN>FeatureTemplates <SPAN class="operator token">=</SPAN> layerTemplates<SPAN class="punctuation token">.</SPAN><SPAN class="token function">ToArray</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
inFeatLayer<SPAN class="punctuation token">.</SPAN><SPAN class="token function">SetDefinition</SPAN><SPAN class="punctuation token">(</SPAN>layerDef<SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="punctuation token">}</SPAN>
<SPAN class="punctuation token">}</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="punctuation token">}</SPAN>
<SPAN class="keyword token">catch</SPAN> <SPAN class="punctuation token">(</SPAN><SPAN class="token class-name">Exception</SPAN> e<SPAN class="punctuation token">)</SPAN>
<SPAN class="punctuation token">{</SPAN>
<SPAN class="keyword token">return</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="punctuation token">}</SPAN>
<SPAN class="punctuation token">}</SPAN><SPAN class="line-numbers-rows"><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN></SPAN>