<?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 Instigate feature edit via API in Inventor Programming - iLogic, Macros, AddIns &amp; Apprentice</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/instigate-feature-edit-via-api/m-p/7552783#M76965</link>
    <description>&lt;P&gt;I would like to edit a feature via the api.&lt;/P&gt;
&lt;P&gt;By edit, I mean bring up the Fillet edit dialog, or Extrude edit, or Revolve or sweep or any other edit dialog. I do not wish to modify the feature by code, I just needs to access the features edit dialog, just the same as double clicking the feature in the browser, or RMB'ing and selecting 'Edit Feature'&lt;/P&gt;
&lt;P&gt;I have the features name (by iterating the browser, and finding the relevant 'node'), i just need the equivalent of&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For each oFeature in oApp.activedocument&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; if oFeature.name = "My Feature" then&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; oFeature.edit&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; end if&lt;/P&gt;
&lt;P&gt;next&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I can use&lt;/P&gt;
&lt;P&gt;oControlDef = oApp.CommandManager.ControlDefinitions.Item("EditExtrudeCtxCmd")&lt;BR /&gt;oControlDef.Execute()&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But this only works with a single feature type, I would need an unknown amount of code, to deal with an unknown amount of different features types (fillets use EditFilletCtxCmd, Revolves use PartRevolveEditCtxCmd. The list goes on)&lt;/P&gt;
&lt;P&gt;Also, with the extrusion example I get the edit feature dialog, but I dont get the 'live' preview, its more akin to the green wireframe preview of yesteryear&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &lt;/P&gt;
&lt;P&gt;Can this be done?&lt;/P&gt;</description>
    <pubDate>Fri, 17 Nov 2017 12:59:20 GMT</pubDate>
    <dc:creator>MattH_Work</dc:creator>
    <dc:date>2017-11-17T12:59:20Z</dc:date>
    <item>
      <title>Instigate feature edit via API</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/instigate-feature-edit-via-api/m-p/7552783#M76965</link>
      <description>&lt;P&gt;I would like to edit a feature via the api.&lt;/P&gt;
&lt;P&gt;By edit, I mean bring up the Fillet edit dialog, or Extrude edit, or Revolve or sweep or any other edit dialog. I do not wish to modify the feature by code, I just needs to access the features edit dialog, just the same as double clicking the feature in the browser, or RMB'ing and selecting 'Edit Feature'&lt;/P&gt;
&lt;P&gt;I have the features name (by iterating the browser, and finding the relevant 'node'), i just need the equivalent of&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For each oFeature in oApp.activedocument&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; if oFeature.name = "My Feature" then&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; oFeature.edit&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; end if&lt;/P&gt;
&lt;P&gt;next&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I can use&lt;/P&gt;
&lt;P&gt;oControlDef = oApp.CommandManager.ControlDefinitions.Item("EditExtrudeCtxCmd")&lt;BR /&gt;oControlDef.Execute()&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But this only works with a single feature type, I would need an unknown amount of code, to deal with an unknown amount of different features types (fillets use EditFilletCtxCmd, Revolves use PartRevolveEditCtxCmd. The list goes on)&lt;/P&gt;
&lt;P&gt;Also, with the extrusion example I get the edit feature dialog, but I dont get the 'live' preview, its more akin to the green wireframe preview of yesteryear&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &lt;/P&gt;
&lt;P&gt;Can this be done?&lt;/P&gt;</description>
      <pubDate>Fri, 17 Nov 2017 12:59:20 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/instigate-feature-edit-via-api/m-p/7552783#M76965</guid>
      <dc:creator>MattH_Work</dc:creator>
      <dc:date>2017-11-17T12:59:20Z</dc:date>
    </item>
    <item>
      <title>Re: Instigate feature edit via API</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/instigate-feature-edit-via-api/m-p/7652859#M78439</link>
      <description>&lt;P&gt;There's not an infinite number of feature types. It's quite few, actually. Just set up a case by case basis.&lt;/P&gt;</description>
      <pubDate>Thu, 28 Dec 2017 18:20:36 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/instigate-feature-edit-via-api/m-p/7652859#M78439</guid>
      <dc:creator>perrysc</dc:creator>
      <dc:date>2017-12-28T18:20:36Z</dc:date>
    </item>
  </channel>
</rss>

