Auto convert flowchart to pseudocode

I have a flowchart that I'd like to auto convert into pseudo code (for a script). It would be useful to also convert back from some pseudocode to a bare flowchart. I think I can see how to do this myself but I was wondering if anyone has attempted this with Diagram Studio or if there is a simple algorithm before I start coding? Thanks for any help.