Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Inventor .tmp Files / Turn Off Undo

7 REPLIES 7
Reply
Message 1 of 8
thomaskennedy
1676 Views, 7 Replies

Inventor .tmp Files / Turn Off Undo

We're trying to squeeze as much performance out of Inventor as possible. We run multiple instances in silent mode and trigger iLogic rules to configure models on the fly.

 

We've noticed that a massive portion of the disk IO is writing to the undo .tmp files. Is there a way (API / regedit etc.) to turn off undo completely, as we will never need it?

 

We do frame our iLogic rules in a single transaction which is helping (I think!) but ideally we want to turn undo off altogether.

 

Thanks

Tom

7 REPLIES 7
Message 2 of 8

I'm afraid there is no way to completely suppress the transaction and undo mechanism.

 

One thing you can try is to use a global transaction: TransactionManager.StartGlobalTransaction. This is an hidden method that will suppress any child transaction happening within it's scope.

 

I hope it helps.

 

Regards,

Philippe.



Philippe Leefsma
Developer Technical Services
Autodesk Developer Network

Message 3 of 8

Thanks Philippe, that's helped a little.

 

From the testing I've done it seems that :

 - 3 temp files are created when opening a model from scratch - A = 32MB, B = 32MB, C = 1MB

 - As an iLogic rule is running the files grow to - A = 229MB (using StartGlobalTransaction) or 294MB (using StartTransaction), B = 32MB, C = 1MB

 - When the rule is finished, some cleanup happens - A = 32MB, B = 32MB, C = 55MB.

 

I think the 'Undo file size' setting in Inventor is controlling the size of file 'C', which has a minimum value of 65MB apparently (tried setting it to 1MB, Inventor changes it to 65MB)

 

So with the StartGlobalTransaction, we've saved around 65MB from writing to the disk, which is positive.

 

We'd be really grateful if you had any more performance tips you'd like to share!

 

Thanks

Tom

Message 4 of 8

Well, I'm afraid that's it for now. If you are really concerned about performances, the best way to go is to drop iLogic and use the Inventor API directly, either from C# or C++ which would be a bit faster, however if you configuration is dependent on iLogic rules embedded in the model, there is not much optimization that you can do...

 

Regards,

Philippe



Philippe Leefsma
Developer Technical Services
Autodesk Developer Network

Message 5 of 8
kmiller
in reply to: philippe.leefsma

I know this is an older post.  But we have implemented some custom addin's (written in c#) which fire on document change event, ending in a lot of iproperty changes.  With this change our undo commands are pretty much nixed in that there are like 30 iproperty edits in the history tree before getting to the actual last step the user would have known they performed.  Is there a way to suppress or turn this off and then potentially back on during edits.  Attached is an example of what our undo history turned into.  It looks like autocad had something where you can disable undo from "recording" however I am fully aware that inventor is not autocad and autocad is not inventor. 

Since this is an older post I was curious if anything has changed in regards to tracking (or not tracking) undo actions.  Running inventor 2019.3. 

-------------------------------------------------------------------------------------------------

If this response answers your question please click "Accept as Solution".
Message 6 of 8
DRoam
in reply to: kmiller

That's easily accomplished by wrapping all of your operations in a single Undo transaction. There are many ways to do that, but here's a pretty simple one:

 

Dim oDoc As Inventor.Document = ThisDoc.Document

Dim oTransaction As Inventor.Transaction = ThisApplication.TransactionManager.StartTransaction(oDoc,"Transaction Name")

Try
	'~~~~~~~~~~~~~~~~~~~~~~~~
	'~~~~~YOUR CODE HERE~~~~~
	'~~~~~~~~~~~~~~~~~~~~~~~~
Catch
	MessageBox.Show("An error occurred")
Finally
	oTransaction.End
End Try

You start a transaction (give it a name of your choosing), do all of your operations, and then end the transaction. You can wrap everything in a Try/Catch so the transaction will still be ended if any errors happen that aren't handled by "YOUR CODE".

Message 7 of 8
kmiller
in reply to: DRoam

So I have read the documentation regarding Inventor Transactions.  However at the end of the documentation it talks about dos and don'ts.  Unfortunately the dialogs I am using (if they are being used) are modeless.  I started looking into using the ChangeProcessor instead and at the CustomCommand sample in the SDK.  It looks however that have to apply the change processor work flow to a button definition and have it start when a button is pressed.  My problem here, is that one of the addins (c#.net - not VBA/macro type program) I am trying to wrap the undo into  is tied to automatically run when a document is changed, opened, activated, new doc started, etc...  there is not a button definition for it.  I am still trying to understand the whole process so there is something I very well could be missing.  But is wrapping up the undo's possible in this situation?  Does anyone know of any other sample type code for this situation that may be out there I can look at?  Or just confirm with me it can't be done in this case?

 

Thanks in advance.  Treading new waters here.

-------------------------------------------------------------------------------------------------

If this response answers your question please click "Accept as Solution".
Message 8 of 8
chandra.shekar.g
in reply to: kmiller

@kmiller ,

 

Hoping that modifying register key value of "KEY_CURRENT_USER\Software\Autodesk\Inventor\RegistryVersion24.0\System\Preferences\Transactions\UndoLevels" (make it zero) may be helpful.

 

Thanks and regards,


CHANDRA SHEKAR G
Developer Advocate
Autodesk Developer Network



Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report