Update loop on save documents inventor 2023. on before save trigger

Update loop on save documents inventor 2023. on before save trigger

andreas.jonssonF98YC
Enthusiast Enthusiast
428 Views
3 Replies
Message 1 of 4

Update loop on save documents inventor 2023. on before save trigger

andreas.jonssonF98YC
Enthusiast
Enthusiast

Hi we have a strange problem when we run code on before save. it starts an endless update cycle where the assemblys becomes out of date (symbol with the firebolt highlights) directly after save and it says that depending files need to be saved again. We have triggers for before save that runs ilogic scripts. On save states it highlights API changes and sometimes property mass change. This issue makes it impossible to check in files to vault because it says that it need to be saved again and again. we do not have an after saved trigger so I find it strange that it is not updated after save.

 

All code has ran smoothly on 2019 to 2022 versions but not in 2023. 

 

can you please solve this issue?

 

 

0 Likes
429 Views
3 Replies
Replies (3)
Message 2 of 4

WCrihfield
Mentor
Mentor

Hi @andreas.jonssonF98YC.  Does the code that runs before save include an instruction to save?  If so, you will likely have to remove that instruction, because that can cause an endless loop.  If triggered before save, then it will continue to save after the code has finished, without you needing to instruct it to save anyways.  Just a tip that some folks miss.

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

0 Likes
Message 3 of 4

andreas.jonssonF98YC
Enthusiast
Enthusiast
No the scripts do not trigger any instructions to save. This code works smoothly in 2019-2022 version. do you have problem with 2023 since it have become very slow and this update loop seems to be as a result of the on before save trigger. it also start the file as unupdated even if it has been saved and closed.
0 Likes
Message 4 of 4

WCrihfield
Mentor
Mentor

My team upgraded directly from 2022 to 2024, skipping over the 2023 release, plus we do not currently have Vault either, so I would not be able to properly compare the behavior on my end.  I do not use many rules with the before save trigger, and do not have any trouble with the ones I do use.  However, I have experienced many, many cases of saving a file just before I am going to close it, then when I close it, it prompts me again to save that file, when I have done nothing between saving the file and closing it.  I even brought the problem up a time or two, but they want you to send them a set of files that are experiencing these problems, so they can help figure it out, and I was not allowed or able to send the set of files (and all the files they referenced), so no solution was ever provided/suggested.  There have been 'ideas' posted in the Inventor Ideas forum about these types of issues before too, and this one below was supposedly 'Implemented' years ago.

https://forums.autodesk.com/t5/inventor-ideas/stop-telling-me-i-need-to-save-something-i-haven-t-cha... 

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

0 Likes