cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Need help navigating or using the PTC Community? Contact the community team. X

Deleting a file after editing

ebenton
1-Newbie

Deleting a file after editing

Using Arbortext Editor 6.0 M040 and C#:

We have a need to delete the file Arbortext uses during an editing session after editing is complete (the contents are stored in a database, so the disk file is only needed while actually editing). Toward that end, we have set up a listener for the DocumentClosed event. Our problem is that Arbortext doesn't appear to release the file until after the event listener has finished processing the event, meaning that when we try to delete the file we get a "File is in use by another process" error. Can anyone help?

1 REPLY 1

Hi Ed--

Maybe you could try using the event callback to trigger a delayed function, which would give Arbortext a chance to finalize the file before the deletion happens. In ACL, you would use timer_add_callback(); in Java you might use Thread.sleep() or something similar.

--Clay

Top Tags