10-09-2018
06:35 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
10-09-2018
06:35 AM
Change occurrence color, then reset it back to how it was before
Hi,
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.
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.
Unless there's a simple way to achieve this, that I don't know of.
Making temporary design views isn't great either.
Does anyone have any hints or ideas how to do this?
10-10-2018
10:11 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
10-10-2018
10:11 AM
Can you try this? It undoes everything.
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
Otherwise you can use it in your code to break up sections and just undo those sections.
If I've helped you, please help me by supporting this idea.
Mass Override for Each Model State
Custom Glyph Icon for iMates
Mass Override for Each Model State
Custom Glyph Icon for iMates