Hello all,
Does anybody have a solution to delete a file from the workspace with a rule.
I have a configurator assembly full of iLogic, and i want the user to be able to rename te assembly and it's drawing in a form.
So i managed the save as of the assembly and it's drawing, but this way the old assembly remains in the workspace. I want to delete the old assembly and the old drawing after the renameing process.
i managed to get the path of the Old files, but just couldent delete them.
Does anybody have a solution?
Thanks alot.
Solved! Go to Solution.
Solved by Curtis_Waguespack. Go to Solution.
Hi SoulAsasin,
Will something like this work?
sFile = "C:\Temp\my_File.ipt" Try My.Computer.FileSystem.DeleteFile(sFile) Catch MessageBox.Show(sFile & vblf & " . . . can not delete file, or file not found.", "iLogic") End Try
I hope this helps.
Best of luck to you in all of your Inventor pursuits,
Curtis
http://inventortrenches.blogspot.com
Hey,
Works like a charm!!! Searched 3 days for something like this 🙂
Hi,
I'll just add another context for other searchers (innovators)
Delete file to Recycle Bin
My.Computer.FileSystem.DeleteFile(sFile, FileIO.UIOption.OnlyErrorDialogs, FileIO.RecycleOption.SendToRecycleBin)