Close files and delete working copies

Close files and delete working copies

JRajendran4
Explorer Explorer
342 Views
2 Replies
Message 1 of 3

Close files and delete working copies

JRajendran4
Explorer
Explorer

Is there a way to stop deleting local files after restricting it from check-in(Even "Close files and delete working copies" is checked)?

 

I have some conditions before checking in files to vault server from Inventor. If the file checkin fails it should not delete local file.How to handle it by C# code?

 

The below code is used to add restriction in "AddFileEvents_GetRestrictions" Event.

JRajendran4_0-1673597323267.png

How to handle the deletion of files if checkin is not happened using c#?

 

JRajendran4_1-1673597429263.png

 

 

 

Thanks in advance

0 Likes
Accepted solutions (1)
343 Views
2 Replies
Replies (2)
Message 2 of 3

Nick_Hall
Collaborator
Collaborator
Accepted solution

Hi

 

Two things

 

Firstly, your snippet only shows an AddFile restriction, but no CheckinFile restriction - if this is not implemented, it might be causing your issue

 

Secondly, if you do have a CheckinFile restriction you seem to be saying that when you ...

  • Set the "Close files and delete working copies" option
  • Click OK in the check-in dialogue box
  • Raise the restrictions in your add-in

... the check-in is restricted, but the files are closed & deleted

 

This should cancel the check-in, and do nothing further, so what is happening isn't correct operation & should be reported as bug

 

Hope some of that is helpful

 

Nick

0 Likes
Message 3 of 3

JRajendran4
Explorer
Explorer

Hi Nick,

 

Thanks for your thoughts! 

 

1) Yes, there is a implementation for CheckinFile restriction too.

2) As per your point, Yes, the check-in is restricted, but the files are closed & deleted so it should be a bug and will report it

 

Jayapriya

0 Likes