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
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.
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
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
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.
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".
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.
@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,