<?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: Change occurrence color, then reset it back to how it was before in Inventor Programming - iLogic, Macros, AddIns &amp; Apprentice</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/change-occurrence-color-then-reset-it-back-to-how-it-was-before/m-p/8325554#M89917</link>
    <description>&lt;P&gt;Can you try this? It undoes everything.&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Dim app As Inventor.Application = ThisApplication
Dim TransMgr As TransactionManager = app.TransactionManager
Dim myTrans As Transaction = TransMgr.StartTransaction(app.ActiveDocument,"ColorChanges")

'Your code here
'...
'...

myTrans.End
TransMgr.UndoTransaction&lt;/PRE&gt;&lt;P&gt;Otherwise you can use it in your code to break up sections and just undo those sections.&lt;/P&gt;</description>
    <pubDate>Wed, 10 Oct 2018 17:11:12 GMT</pubDate>
    <dc:creator>clutsa</dc:creator>
    <dc:date>2018-10-10T17:11:12Z</dc:date>
    <item>
      <title>Change occurrence color, then reset it back to how it was before</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/change-occurrence-color-then-reset-it-back-to-how-it-was-before/m-p/8322400#M89859</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I'm changing colors (appearances) of occurrences within an interactive vba macro, then when it's done, they need to be changed back (reset) to how they were before.&lt;/P&gt;&lt;P&gt;But the way I do this (storing appearance and appearance source) doesn't work perfectly, as it discards any possible previous overrides. But dealing with overrides is really too awkward just for this.&lt;/P&gt;&lt;P&gt;Unless there's a simple way to achieve this, that I don't know of.&lt;/P&gt;&lt;P&gt;Making temporary design views isn't great either.&lt;/P&gt;&lt;P&gt;Does anyone have any hints or ideas how to do this?&lt;/P&gt;</description>
      <pubDate>Tue, 09 Oct 2018 13:35:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/change-occurrence-color-then-reset-it-back-to-how-it-was-before/m-p/8322400#M89859</guid>
      <dc:creator>bshbsh</dc:creator>
      <dc:date>2018-10-09T13:35:24Z</dc:date>
    </item>
    <item>
      <title>Re: Change occurrence color, then reset it back to how it was before</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/change-occurrence-color-then-reset-it-back-to-how-it-was-before/m-p/8325554#M89917</link>
      <description>&lt;P&gt;Can you try this? It undoes everything.&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Dim app As Inventor.Application = ThisApplication
Dim TransMgr As TransactionManager = app.TransactionManager
Dim myTrans As Transaction = TransMgr.StartTransaction(app.ActiveDocument,"ColorChanges")

'Your code here
'...
'...

myTrans.End
TransMgr.UndoTransaction&lt;/PRE&gt;&lt;P&gt;Otherwise you can use it in your code to break up sections and just undo those sections.&lt;/P&gt;</description>
      <pubDate>Wed, 10 Oct 2018 17:11:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/change-occurrence-color-then-reset-it-back-to-how-it-was-before/m-p/8325554#M89917</guid>
      <dc:creator>clutsa</dc:creator>
      <dc:date>2018-10-10T17:11:12Z</dc:date>
    </item>
  </channel>
</rss>

