Purge in Revit 23

try to call eTransmitUpgradeOMatic.purgeUnused() twice

def purgeUnsed(currentDoc):
    if eTransmit is not None:
        for _ in range(2):
            eTransmitUpgradeOMatic = eTransmit.eTransmitUpgradeOMatic(app)
            resultPurg = eTransmitUpgradeOMatic.purgeUnused(currentDoc)
        return resultPurg
    return "Failed"

On this note… In R25 I get everything deleted but I get a view with Id 230 left (what sort of strange Id is that?)

Is this some Revit internal thing?

Check the workset. :wink:

:face_with_open_eyes_and_hand_over_mouth:

Hopefully this goes without saying, but don’t delete that…

Bwhahahaha!!!

Seriously this is the fastest way to make a ‘no one can open this anymore, so just delete the file’… though I think it is protected to the point of ‘you can’t do that’ in the file format now…

I was laughing at the idea anyone would be … er… moose… enough to delete it!