Delete locked objects?


#1

Is there a way to delete locked objects via Python/RhinoCommon?

Thanks,
–Mitch


(Menno Deij - van Rijswijk) #2

Unlock first, then delete.

toDelete #object id of object that must be deleted
if (doc.Objects.Unlock(toDelete, True)): #if unlock is successful
    doc.Objects.Delete(toDelete, True) #delete


#3

Yeah, that’s what I ended up doing… Dumb question really…

Thanks, --Mitch