<?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: How do you create a new feature with a default radius? in ArcObjects SDK Questions</title>
    <link>https://community.esri.com/t5/arcobjects-sdk-questions/how-do-you-create-a-new-feature-with-a-default/m-p/504142#M13546</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;&lt;BR /&gt;Now how do I change the radius of the feature during the creation process?&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;When &lt;/SPAN&gt;&lt;SPAN style="font-style:italic;"&gt;OnCreate &lt;/SPAN&gt;&lt;SPAN&gt;fires the feature is already there so the only thing you could do is recreate the geometry of the feature (IObject) to a fixed radius.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You cant set the radius of the core circle construction tool through code.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I think you would be better off here making a custom circle construction tool who's radius would persist during the edit session.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 24 Feb 2012 15:09:03 GMT</pubDate>
    <dc:creator>Anonymous User</dc:creator>
    <dc:date>2012-02-24T15:09:03Z</dc:date>
    <item>
      <title>How do you create a new feature with a default radius?</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/how-do-you-create-a-new-feature-with-a-default/m-p/504141#M13545</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;When a new feature is created using the Create Feature template for my Polygon Feature Class and using the "Circle" tool how can I assign a default radius to the circle during creation?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've trapped for the OnCreate using an extension.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I've trapped for the use of the circle tool.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Now how do I change the radius of the feature during the creation process?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; public void OnCreate(IObject obj)

.....
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ICommandItem ci = afoGlobals.afoApp.CurrentTool;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (ci != null)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; switch (ci.Caption.ToLower())
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; case "circle":
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ISegmentCollection sc = new ESRI.ArcGIS.Geometry.Polygon as ISegmentCollection;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IEditSketch es = myEditor3 as IEditSketch;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sc.SetCircle(es.LastPoint, 25);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IFeature f = obj as IFeature;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; f.Shape = sc;&amp;nbsp; ?????????
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; break;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;G&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Feb 2012 12:58:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/how-do-you-create-a-new-feature-with-a-default/m-p/504141#M13545</guid>
      <dc:creator>GregRieck</dc:creator>
      <dc:date>2012-02-24T12:58:13Z</dc:date>
    </item>
    <item>
      <title>Re: How do you create a new feature with a default radius?</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/how-do-you-create-a-new-feature-with-a-default/m-p/504142#M13546</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;&lt;BR /&gt;Now how do I change the radius of the feature during the creation process?&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;When &lt;/SPAN&gt;&lt;SPAN style="font-style:italic;"&gt;OnCreate &lt;/SPAN&gt;&lt;SPAN&gt;fires the feature is already there so the only thing you could do is recreate the geometry of the feature (IObject) to a fixed radius.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You cant set the radius of the core circle construction tool through code.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I think you would be better off here making a custom circle construction tool who's radius would persist during the edit session.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Feb 2012 15:09:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/how-do-you-create-a-new-feature-with-a-default/m-p/504142#M13546</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2012-02-24T15:09:03Z</dc:date>
    </item>
    <item>
      <title>Re: How do you create a new feature with a default radius?</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/how-do-you-create-a-new-feature-with-a-default/m-p/504143#M13547</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Sean,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you for taking the time to respond to my post.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It sure would be nice if there were an easy way to assign a default radius to a template that uses the circle construction tool. I did a quick search and this seems to be a common request. Here is one &lt;/SPAN&gt;&lt;A href="http://forums.arcgis.com/threads/14448-circle-tool-in-desktop-10"&gt;thread&lt;/A&gt;&lt;SPAN&gt;. You mention a "custom circle construction tool" as a possible solution. However, if I'm not mistaken that involves creating a button to activate it. To me that defeats the purpose of Create Feature Templates. I'd much rather use the template to create the initial feature and then change it's radius through code. This is something I had done previously in 9. It also dealt with the feature after it was created. In fact it used the ISegmentCollection and is the source of my start of completing this task at 10.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The clients requested default radius is stored in our database and queried when this particular feature is created.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The issue I'm having at 10 is I'm no longer able to perform this cast:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;SegmentCollection.SetCircle EditSketch.LastPoint, Radius&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Feature.Shape = SegmentCollection&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I also have a 9 routine that allows the user to select "N" of this particular feature and change the default radius using an input box.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Have you tried changing the default radius on a feature? I find it difficult to get the radius dialog to even appear. Personally, the idea of the feature templates is to allow the user to perform quick edit tasks. Not being able to do something as simple as assigning a default radius is certainly preventing that from happening.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Greg&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Feb 2012 16:08:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/how-do-you-create-a-new-feature-with-a-default/m-p/504143#M13547</guid>
      <dc:creator>GregRieck</dc:creator>
      <dc:date>2012-02-24T16:08:27Z</dc:date>
    </item>
  </channel>
</rss>

