Added functions to export Diagrams