Automating the Diagram Generation Process