<?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: Simple UNDO rule in Inventor Programming - iLogic, Macros, AddIns &amp; Apprentice</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/simple-undo-rule/m-p/7648311#M78396</link>
    <description>&lt;P&gt;Hi @Anonymous&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hoping that following iLogic code would help.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;Dim oCommandMgr As CommandManager 
oCommandMgr = ThisApplication.CommandManager 

' Get control definition for the line command. 
Dim oControlDef As ControlDefinition 
 oControlDef = oCommandMgr.ControlDefinitions.Item( _ 
                                             "AppUndoCmd")  
' Execute the command. 
Call oControlDef.Execute&lt;/PRE&gt;
&lt;P&gt;Please feel free to contact if there is any queries.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If solves problem, click on "Accept as solution" / give a "Kudo".&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks and regards,&lt;/P&gt;</description>
    <pubDate>Tue, 26 Dec 2017 06:25:56 GMT</pubDate>
    <dc:creator>chandra.shekar.g</dc:creator>
    <dc:date>2017-12-26T06:25:56Z</dc:date>
    <item>
      <title>Simple UNDO rule</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/simple-undo-rule/m-p/7644660#M78350</link>
      <description>&lt;P&gt;Can anyone show me a code that does an UNDO in a document. Thank you guys for the replies.&lt;/P&gt;</description>
      <pubDate>Fri, 22 Dec 2017 14:02:47 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/simple-undo-rule/m-p/7644660#M78350</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-12-22T14:02:47Z</dc:date>
    </item>
    <item>
      <title>Re: Simple UNDO rule</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/simple-undo-rule/m-p/7645284#M78352</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is Possible:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;Check this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Dim oTransMgr As TransactionManager&lt;BR /&gt;Dim m_inventorApplication as inventor.application&lt;BR /&gt;m_inventorApplication = thisapplication&lt;BR /&gt;
oTransMgr = m_inventorApplication.TransactionManager
Dim oTrans As Transaction
oTrans = oTransMgr.StartTransactionForDocumentOpen("DEscription Of the Command")

'YOUR CODE HERE
'YOUR CODE HERE

oTrans.End()&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;The rule or command can now simply being undo with the undo button in Inventor or Ctrl+Z&lt;/P&gt;</description>
      <pubDate>Fri, 22 Dec 2017 18:34:58 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/simple-undo-rule/m-p/7645284#M78352</guid>
      <dc:creator>bradeneuropeArthur</dc:creator>
      <dc:date>2017-12-22T18:34:58Z</dc:date>
    </item>
    <item>
      <title>Re: Simple UNDO rule</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/simple-undo-rule/m-p/7648311#M78396</link>
      <description>&lt;P&gt;Hi @Anonymous&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hoping that following iLogic code would help.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;Dim oCommandMgr As CommandManager 
oCommandMgr = ThisApplication.CommandManager 

' Get control definition for the line command. 
Dim oControlDef As ControlDefinition 
 oControlDef = oCommandMgr.ControlDefinitions.Item( _ 
                                             "AppUndoCmd")  
' Execute the command. 
Call oControlDef.Execute&lt;/PRE&gt;
&lt;P&gt;Please feel free to contact if there is any queries.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If solves problem, click on "Accept as solution" / give a "Kudo".&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks and regards,&lt;/P&gt;</description>
      <pubDate>Tue, 26 Dec 2017 06:25:56 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/simple-undo-rule/m-p/7648311#M78396</guid>
      <dc:creator>chandra.shekar.g</dc:creator>
      <dc:date>2017-12-26T06:25:56Z</dc:date>
    </item>
    <item>
      <title>Re: Simple UNDO rule</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/simple-undo-rule/m-p/7648472#M78398</link>
      <description>This is only the undo command from the commandmanager. But with the transactionmanager you are able to undo a specific command.</description>
      <pubDate>Tue, 26 Dec 2017 09:10:31 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/simple-undo-rule/m-p/7648472#M78398</guid>
      <dc:creator>bradeneuropeArthur</dc:creator>
      <dc:date>2017-12-26T09:10:31Z</dc:date>
    </item>
    <item>
      <title>Re: Simple UNDO rule</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/simple-undo-rule/m-p/7649880#M78405</link>
      <description>&lt;P&gt;Thanks, both of you. I got what I needed.&lt;/P&gt;</description>
      <pubDate>Wed, 27 Dec 2017 07:43:33 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/simple-undo-rule/m-p/7649880#M78405</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-12-27T07:43:33Z</dc:date>
    </item>
    <item>
      <title>Re: Simple UNDO rule</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/simple-undo-rule/m-p/10807194#M132192</link>
      <description>&lt;P&gt;just use:&lt;BR /&gt;ThisApplication.CommandManager.ControlDefinitions.Item("&lt;EM&gt;&lt;STRONG&gt;CommandName&lt;/STRONG&gt;&lt;/EM&gt;").Execute&lt;BR /&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt;CommandName&lt;/STRONG&gt; &lt;/EM&gt;you can find here:&lt;BR /&gt;&lt;A href="https://github.com/AlexFielder/iLogic/blob/master/CommandNames.txt" target="_blank"&gt;https://github.com/AlexFielder/iLogic/blob/master/CommandNames.txt&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Dec 2021 19:38:18 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/simple-undo-rule/m-p/10807194#M132192</guid>
      <dc:creator>engilic</dc:creator>
      <dc:date>2021-12-07T19:38:18Z</dc:date>
    </item>
    <item>
      <title>Re: Simple UNDO rule</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/simple-undo-rule/m-p/11543980#M145019</link>
      <description>&lt;P&gt;Thanks this transaction handling helped me&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Nov 2022 15:31:36 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/simple-undo-rule/m-p/11543980#M145019</guid>
      <dc:creator>ktelangCGFU6</dc:creator>
      <dc:date>2022-11-10T15:31:36Z</dc:date>
    </item>
  </channel>
</rss>

