Community
Inventor Forum
Welcome to Autodesk’s Inventor Forums. Share your knowledge, ask questions, and explore popular Inventor topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

iLogic - Delete part file; Save new file with same name

3 REPLIES 3
Reply
Message 1 of 4
glenrouch84TLA
195 Views, 3 Replies

iLogic - Delete part file; Save new file with same name

Hello all,

 

I have an assembly file with user parameters that based on the selection will open a specific part file template, re-name it, and save it to a specific location. I want to add the functionality so if the original parameter is changed it will delete the "old" part file, import the "new" part file template, and re-name it to the same location and have the same file name. So far I have been able to get the initial part file to import/save correctly but whenever I try and change the parameter an error pops up saying "The parameter is incorrect". It seems to me like Inventor is still holding on to the deleted file's data and not letting me use the same file name. Does anybody have a solution for this?

 

Thank you

Labels (1)
3 REPLIES 3
Message 2 of 4

Hi! I guess the "deleted" file is still loaded in the memory. Maybe you need to add the following statement in the iLogic rule.

 

FileManager.RefreshAllDocuments()

 

It is like going to Inventor -> File -> Manage -> Refresh. It will reload the files from disk.

Many thanks!



Johnson Shiue (johnson.shiue@autodesk.com)
Software Test Engineer
Message 3 of 4

Thank you for your response. I tried putting that statement in the rule but an error stating "Reference to a non-shared member requires an object reference" and then tried the manual version of your solution and got the original error I was having. Is there something that I am missing with the FileManager.RefreshAllDocuments() callout?

Message 4 of 4

Hi! Try this simple rule.

 

ThisApplication.FileManager.RefreshAllDocuments

 

Many thanks!



Johnson Shiue (johnson.shiue@autodesk.com)
Software Test Engineer

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

Post to forums  

Technology Administrators


Autodesk Design & Make Report