We do not have a Python sample, but there is an example C# project to create a standalone executable that can be scheduled for automating the Orphaned Version Cleanup process. There is not currently a way to do this with Python.
Let me know if you have any questions!
Thank you Sam,
I am not sure how to compile the C# project but will investigate further as this looks like a winner
Senior Systems Analyst
Level 1, 400 King William Street, Adelaide SA 5000
d +61 8 8113 9182
m +61 0476 824 150
Esri Australia helped with providing a compiled version of the script that has a config file that allows it to be run with different databases and settings. If you want a copy of the scripts let me know as I have found it valuable.
A compiled version would be very, very helpful.
... Very helpful.
I keep looking for SQL that does this. Wouldn't that be nice? A trigger that fires on update where MM_PX_VERSIONS.STATUS = 4 ... makes me salivate just a little. And/Or a procedure that goes through and drops all the CU's and miscellaneous, stranded cruft (because several times we logged in to the wrong schema when running the tool)... that would be nice as well. It is mind-boggling that this corner of ArcFM which is integral to database sanity is only available as a tool that must be manually, frequently ran. It sets me on a rant every time, and is bad for my blood pressure.
The unmodified code sample, if you choose to use it, may or may not work correctly with design versions.
Thanks for asking the question!