Purge all versions (including controlled versions)

Purge all versions (including controlled versions)

jason.dupree
Advocate Advocate
806 Views
7 Replies
Message 1 of 8

Purge all versions (including controlled versions)

jason.dupree
Advocate
Advocate

Is it possible to delete all versions on a file using the API including the controlled versions? With the check box available in the UI when deleting an individual version to Ignore Restrictions, is this available in the API?

Jason Dupree
Senior Consultant - ECAD, Inc.
0 Likes
Accepted solutions (2)
807 Views
7 Replies
Replies (7)
Message 2 of 8

Markus.Koechl
Autodesk
Autodesk

You can use the method DeleteFileVersionsByMasterIdsUnconditional; however, I have not implemented it yet and cannot share more code.



Markus Koechl

Solutions Engineer PDM, Autodesk Central Europe
0 Likes
Message 3 of 8

jason.dupree
Advocate
Advocate
Accepted solution

Thanks, Markus. I did find the DeleteFileVersionsByMasterIdsUnconditional method and DeleteFileVersionsUnconditional. For anyone else that runs across this, here's a couple of things that are useful to know.

DeleteFileVersionsByMasterIdsUnconditional
Is run on the MasterID of a file

While is unconditional, it's still bound by any lifecycle control on that file

Can use normal purge rules for uncontrolled (by a lifecycle) files, like keep latest #, keep latest since date, etc

 

DeleteFileVersionsUnconditional

Is run on the FileID which is particular to a version

Will delete the version truly unconditionally
Latest version cannot be deleted (pretty sure this applies to both methods)

I hope someone else finds this useful.

Jason Dupree
Senior Consultant - ECAD, Inc.
0 Likes
Message 4 of 8

jason.dupree
Advocate
Advocate

It seems as though I don't have this quite as buttoned up as I thought. Released versions are not allowing for the unconditional purge, even through the UI, the Ignore Restrictions button is greyed out. Any ideas?

 

Jason Dupree
Senior Consultant - ECAD, Inc.
0 Likes
Message 5 of 8

Markus.Koechl
Autodesk
Autodesk
I think that matching capabilities for UI and API are intended and make absolute sense.


Markus Koechl

Solutions Engineer PDM, Autodesk Central Europe
0 Likes
Message 6 of 8

jason.dupree
Advocate
Advocate

That's definitely understandable. Do you know if it's possible at all to delete Released revisions? Or to change the property 'Latest Released Revision' from True to False? Maybe that would allow the deletion then?

Jason Dupree
Senior Consultant - ECAD, Inc.
0 Likes
Message 7 of 8

Markus.Koechl
Autodesk
Autodesk
Accepted solution

As far as I know, both questions are to be answered "no". Only an unconditional file (master) deletion can erase released versions. But that's completely different from your objective.



Markus Koechl

Solutions Engineer PDM, Autodesk Central Europe
0 Likes
Message 8 of 8

jason.dupree
Advocate
Advocate

Thanks for clarifying, Markus.

Jason Dupree
Senior Consultant - ECAD, Inc.
0 Likes