I have addin with defined EA_OnPostNewDiagramObject with a code :
private void DeleteElementEntirely(Repository Repository, EA.Element element) {