Parsing filename of diagram.